mariadb/mysql-test/suite/tokudb.alter_table/t/hcad_indexing_mix.test
Rich Prohaska 4f4258be5d refs #5545 baseline mysql alter table tests to mysql 5.5
git-svn-id: file:///svn/mysql/tests/mysql-test@48560 c7de825b-a66e-492c-adef-691d508d4ae1
2012-10-03 17:32:22 +00:00

152 lines
No EOL
4.9 KiB
Text

#--source include/have_tokudb.inc
SET DEFAULT_STORAGE_ENGINE='tokudb';
--disable_warnings
DROP TABLE IF EXISTS foo,bar;
--enable_warnings
set session tokudb_disable_slow_alter=ON;
create table foo (aa int, bb int, cc int, dd int, ee int, a int, b varchar(20), c int, d int, e int, primary key (e), key(d), unique key(c), clustering key (b));
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column e;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column d;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column c;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column b;
alter table foo add column aaa int first;
alter table foo drop column aaa;
alter table foo add column aaa int first;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index d;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, add index (bb);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop index b, add index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index b, add index b(d);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index b, add index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index b, add clustering index b(b(5));
# successfully drop it
alter table foo drop column aaa, drop index b, add clustering index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index d;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, add index (bb);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(d);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add unique index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add clustering index b(b(5));
# successfully add it
alter table foo add column aaa int, drop index b, add clustering index b(b);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index c;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, add index (bb);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop index c, add index c(c);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index c, add index c(d);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index c, add index c(c);
# successfully drop it
alter table foo drop column aaa, drop index c, add unique index c(c);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, add index (bb);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add index c(c);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add index c(d);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add clustering index c(c);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add index c(c);
# successfully add it
alter table foo add column aaa int, drop index c, add unique index c(c);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, drop column c;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, add column bbbb int, drop column c;
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, drop column c, drop column b;
drop table foo;