Commit 47e6cc1f authored by Rich Prohaska's avatar Rich Prohaska

Tokutek/mysql#14 test case for drop pk gets invalid key prefix bug

parent 2ea52a40
set default_storage_engine=tokudb;
DROP TABLE IF EXISTS testtable;
CREATE TABLE `testtable` (
`id` INT(11) NOT NULL,
`keyword` VARCHAR(299) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`(100))
) ENGINE=TokuDB DEFAULT CHARSET=utf8 ROW_FORMAT=TOKUDB_QUICKLZ;
set tokudb_disable_hot_alter=ON;
ALTER TABLE testtable DROP PRIMARY KEY;
drop table testtable;
CREATE TABLE `testtable` (
`id` INT(11) NOT NULL,
`keyword` VARCHAR(299) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`(100))
) ENGINE=TokuDB DEFAULT CHARSET=utf8 ROW_FORMAT=TOKUDB_QUICKLZ;
set tokudb_disable_hot_alter=OFF;
ALTER TABLE testtable DROP PRIMARY KEY;
drop table testtable;
# drop primary key should work. 5.5 alter table has a bug where drop pk returns invalid key prefix
source include/have_tokudb.inc;
set default_storage_engine=tokudb;
disable_warnings;
DROP TABLE IF EXISTS testtable;
enable_warnings;
CREATE TABLE `testtable` (
`id` INT(11) NOT NULL,
`keyword` VARCHAR(299) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`(100))
) ENGINE=TokuDB DEFAULT CHARSET=utf8 ROW_FORMAT=TOKUDB_QUICKLZ;
set tokudb_disable_hot_alter=ON;
ALTER TABLE testtable DROP PRIMARY KEY;
drop table testtable;
CREATE TABLE `testtable` (
`id` INT(11) NOT NULL,
`keyword` VARCHAR(299) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`(100))
) ENGINE=TokuDB DEFAULT CHARSET=utf8 ROW_FORMAT=TOKUDB_QUICKLZ;
set tokudb_disable_hot_alter=OFF;
ALTER TABLE testtable DROP PRIMARY KEY;
drop table testtable;
\ No newline at end of file
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