2012-03-16 15:51:59 +00:00
#--source include/have_tokudb.inc
2012-10-03 17:32:22 +00:00
SET DEFAULT_STORAGE_ENGINE='tokudb';
2012-03-16 15:51:59 +00:00
--disable_warnings
DROP TABLE IF EXISTS foo,bar;
--enable_warnings
set session tokudb_disable_slow_alter=ON;
2012-10-03 17:32:22 +00:00
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));
2012-03-16 15:51:59 +00:00
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column e;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column d;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column c;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--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;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index d;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, add index (bb);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop index b, add index b(b);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index b, add index b(d);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index b, add index b(b);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--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);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index d;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, add index (bb);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(b);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(d);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add unique index b(b);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index b, add index b(b);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--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);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index c;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, add index (bb);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop index c, add index c(c);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo drop column aaa, drop index c, add index c(d);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--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);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, add index (bb);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add index c(c);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add index c(d);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaa int, drop index c, add clustering index c(c);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--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);
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, drop column c;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, add column bbbb int, drop column c;
2012-10-03 17:32:22 +00:00
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
2012-03-16 15:51:59 +00:00
--error ER_UNSUPPORTED_EXTENSION
alter table foo add column aaaa int, drop column c, drop column b;
drop table foo;