mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
b7a9386598
git-svn-id: file:///svn/mysql/tests/mysql-test@48564 c7de825b-a66e-492c-adef-691d508d4ae1
26 lines
759 B
Text
26 lines
759 B
Text
SET DEFAULT_STORAGE_ENGINE='TokuDB';
|
|
DROP TABLE IF EXISTS foo;
|
|
SET SESSION tokudb_disable_slow_alter=1;
|
|
CREATE TABLE foo (a INT, b INT, PRIMARY KEY (a)) PARTITION BY HASH(a) PARTITIONS 2;
|
|
INSERT INTO foo VALUES (1,0),(2,0);
|
|
SHOW CREATE TABLE foo;
|
|
Table Create Table
|
|
foo CREATE TABLE `foo` (
|
|
`a` int(11) NOT NULL DEFAULT '0',
|
|
`b` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (a)
|
|
PARTITIONS 2 */
|
|
ALTER TABLE foo ADD KEY(b);
|
|
SHOW CREATE TABLE foo;
|
|
Table Create Table
|
|
foo CREATE TABLE `foo` (
|
|
`a` int(11) NOT NULL DEFAULT '0',
|
|
`b` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`a`),
|
|
KEY `b` (`b`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (a)
|
|
PARTITIONS 2 */
|
|
DROP TABLE foo;
|