Commit ac45ebc1 authored by Rich Prohaska's avatar Rich Prohaska

DB-720 test case for clustering keys on partitioned tokudb tables

parent d85b993c
set default_storage_engine='tokudb';
drop table if exists t;
create table t (
x int not null,
y int not null,
primary key(x))
partition by hash(x) partitions 2;
show create table t;
Table Create Table
t CREATE TABLE `t` (
`x` int(11) NOT NULL,
`y` int(11) NOT NULL,
PRIMARY KEY (`x`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (x)
PARTITIONS 2 */
alter table t add clustering key(y);
show create table t;
Table Create Table
t CREATE TABLE `t` (
`x` int(11) NOT NULL,
`y` int(11) NOT NULL,
PRIMARY KEY (`x`),
CLUSTERING KEY `y` (`y`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (x)
PARTITIONS 2 */
drop table t;
# Test that clustering keys can be created on partitioned tokudb tables
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
create table t (
x int not null,
y int not null,
primary key(x))
partition by hash(x) partitions 2;
show create table t;
alter table t add clustering key(y);
show create table t;
drop table t;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment