mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 00:34:18 +01:00
fa56230e72
git-svn-id: file:///svn/mysql/tests/mysql-test@47682 c7de825b-a66e-492c-adef-691d508d4ae1
41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
DROP TABLE IF EXISTS foo, bar;
|
|
SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB';
|
|
CREATE TABLE foo (id INT PRIMARY KEY) PARTITION BY HASH(id) PARTITIONS 2;
|
|
SHOW CREATE TABLE foo;
|
|
Table Create Table
|
|
foo CREATE TABLE `foo` (
|
|
`id` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (id)
|
|
PARTITIONS 2 */
|
|
CREATE TABLE bar LIKE foo;
|
|
SHOW CREATE TABLE bar;
|
|
Table Create Table
|
|
bar CREATE TABLE `bar` (
|
|
`id` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (id)
|
|
PARTITIONS 2 */
|
|
ALTER TABLE foo ADD COLUMN a INT;
|
|
SHOW CREATE TABLE foo;
|
|
Table Create Table
|
|
foo CREATE TABLE `foo` (
|
|
`id` int(11) NOT NULL,
|
|
`a` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (id)
|
|
PARTITIONS 2 */
|
|
FLUSH TABLES;
|
|
SHOW CREATE TABLE foo;
|
|
Table Create Table
|
|
foo CREATE TABLE `foo` (
|
|
`id` int(11) NOT NULL,
|
|
`a` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=TokuDB DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY HASH (id)
|
|
PARTITIONS 2 */
|
|
DROP TABLE foo, bar;
|