标签:style blog http 使用 strong os
INSTALL PLUGIN tokudb SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_file_map SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_fractal_tree_info SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_trx SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_locks SONAME ‘ha_tokudb.so‘; INSTALL PLUGIN tokudb_lock_waits SONAME ‘ha_tokudb.so‘;
mysql> CREATE TABLE `City` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT ‘‘, `CountryCode` char(3) NOT NULL DEFAULT ‘‘, `District` char(20) NOT NULL DEFAULT ‘‘, `Population` int(11) NOT NULL DEFAULT ‘0‘, PRIMARY KEY (`ID`), KEY `CountryCode` (`CountryCode`) ) ENGINE=TokuDB |
mysql> ALTER TABLE City ENGINE=TokuDB; |
mysql> insert into City_tokudb(ID) values(1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into City_innodb(ID) values(1);
Query OK, 1 row affected (0.00 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into City_innodb(ID) values(2);
Query OK, 1 row affected (0.00 sec)
mysql> insert into City_tokudb(ID) values(2);
Query OK, 1 row affected (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from City_innodb;
+----+------+-------------+----------+------------+
| ID | Name | CountryCode | District | Population |
+----+------+-------------+----------+------------+
| 1 | | | | 0 |
| 2 | | | | 0 |
+----+------+-------------+----------+------------+
2 rows in set (0.00 sec)
mysql> select * from City_tokudb;
+----+------+-------------+----------+------------+
| ID | Name | CountryCode | District | Population |
+----+------+-------------+----------+------------+
| 1 | | | | 0 |
| 2 | | | | 0 |
+----+------+-------------+----------+------------+
2 rows in set (0.00 sec)
|
mysql> CREATE TABLE `City_repl` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT ‘‘, `CountryCode` char(3) NOT NULL DEFAULT ‘‘, `District` char(20) NOT NULL DEFAULT ‘‘, `Population` int(11) NOT NULL DEFAULT ‘0‘, PRIMARY KEY (`ID`), KEY `CountryCode` (`CountryCode`) ) ENGINE=TokuDB;
Query OK, 0 rows affected (0.01 sec)
mysql> insert into City_repl(ID) values(1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into City_repl(ID) values(2);
Query OK, 1 row affected (0.00 sec)
mysql> delete from City_repl where ID=1;
Query OK, 1 row affected (0.00 sec)
mysql> update City_repl set ID=3 where ID=2;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
|
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| City_repl |
+----------------+
1 row in set (0.00 sec)
mysql> select * from City_repl;
+----+------+-------------+----------+------------+
| ID | Name | CountryCode | District | Population |
+----+------+-------------+----------+------------+
| 1 | | | | 0 |
| 2 | | | | 0 |
+----+------+-------------+----------+------------+
2 rows in set (0.00 sec)
mysql> select * from City_repl;
+----+------+-------------+----------+------------+
| ID | Name | CountryCode | District | Population |
+----+------+-------------+----------+------------+
| 2 | | | | 0 |
+----+------+-------------+----------+------------+
1 row in set (0.00 sec)
mysql> select * from City_repl;
+----+------+-------------+----------+------------+
| ID | Name | CountryCode | District | Population |
+----+------+-------------+----------+------------+
| 3 | | | | 0 |
+----+------+-------------+----------+------------+
|
标签:style blog http 使用 strong os
原文地址:http://www.cnblogs.com/liuhao/p/3836126.html