1--source include/have_tokudb.inc 2SET DEFAULT_STORAGE_ENGINE='tokudb'; 3 4--disable_warnings 5DROP TABLE IF EXISTS foo,bar; 6--enable_warnings 7 8set session tokudb_disable_slow_alter=ON; 9 10 11create 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))engine=TokuDB; 12create table bar (a int) engine=TokuDB; 13 14--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 15--error ER_UNSUPPORTED_EXTENSION 16alter table foo drop primary key; 17--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 18--error ER_UNSUPPORTED_EXTENSION 19alter table foo drop primary key, add column z int; 20--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 21--error ER_UNSUPPORTED_EXTENSION 22alter table foo drop primary key, drop column aa; 23--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 24--error ER_UNSUPPORTED_EXTENSION 25alter table bar add primary key (a); 26--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 27--error ER_UNSUPPORTED_EXTENSION 28alter table bar add primary key (a), add column z int; 29 30--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 31--error ER_UNSUPPORTED_EXTENSION 32alter table foo drop primary key, add primary key (b); 33--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 34--error ER_UNSUPPORTED_EXTENSION 35alter table foo drop primary key, add primary key (b), add column z int; 36--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 37--error ER_UNSUPPORTED_EXTENSION 38alter table foo drop primary key, add primary key (b), drop column aa; 39 40--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 41--error ER_TABLE_CANT_HANDLE_FT 42alter table foo add fulltext key(b); 43--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 44--error ER_TABLE_CANT_HANDLE_SPKEYS 45alter table foo add spatial key (aa); 46 47# change default 48alter table foo alter column cc set default 101010; 49alter table foo alter column cc set default NULL; 50alter table foo alter column cc drop default; 51 52# Supporting these should be trivial 53--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 54--error ER_UNSUPPORTED_EXTENSION 55alter table foo alter column cc set default 101010, add column z int; 56--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 57--error ER_UNSUPPORTED_EXTENSION 58alter table foo alter column cc set default NULL, add column z int; 59--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 60--error ER_UNSUPPORTED_EXTENSION 61alter table foo alter column cc drop default, add column z int; 62--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 63--error ER_UNSUPPORTED_EXTENSION 64alter table foo alter column cc set default 101010, drop column aa; 65--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 66--error ER_UNSUPPORTED_EXTENSION 67alter table foo alter column cc set default NULL, drop column aa; 68--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 69--error ER_UNSUPPORTED_EXTENSION 70alter table foo alter column cc drop default, drop column aa; 71 72# these one day MAY be supported 73--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 74--error ER_UNSUPPORTED_EXTENSION 75alter table foo change column aa aaa int, add column z int; 76--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 77--error ER_UNSUPPORTED_EXTENSION 78alter table foo change column e epk int, add column z int; 79--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 80--error ER_UNSUPPORTED_EXTENSION 81alter table foo change column aa aaa int, drop column bb; 82--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 83--error ER_UNSUPPORTED_EXTENSION 84alter table foo change column e epk int, drop column bb; 85show create table foo; 86 87# the following changes of a column should be slow 88--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 89--error ER_UNSUPPORTED_EXTENSION 90alter table foo change column aa aa int NOT NULL; 91#--error ER_UNSUPPORTED_EXTENSION 92#alter table foo change column aa aa bigint; 93--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 94--error ER_UNSUPPORTED_EXTENSION 95alter table foo change column aa aa varchar(20); 96--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 97--error ER_UNSUPPORTED_EXTENSION 98alter table foo change column aa aa int after cc; 99--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 100--error ER_UNSUPPORTED_EXTENSION 101alter table foo modify column aa int NOT NULL; 102#--error ER_UNSUPPORTED_EXTENSION 103#alter table foo modify column aa bigint; 104--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 105--error ER_UNSUPPORTED_EXTENSION 106alter table foo modify column aa varchar(20); 107--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 108--error ER_UNSUPPORTED_EXTENSION 109alter table foo modify column aa int after cc; 110 111--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 112--error ER_UNSUPPORTED_EXTENSION 113alter table foo change column aa aa int NOT NULL, add column z int; 114--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 115--error ER_UNSUPPORTED_EXTENSION 116alter table foo change column aa aa bigint, add column z int; 117--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 118--error ER_UNSUPPORTED_EXTENSION 119alter table foo change column aa aa varchar(20), add column z int; 120--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 121--error ER_UNSUPPORTED_EXTENSION 122alter table foo change column aa aa int after cc, add column z int; 123--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 124--error ER_UNSUPPORTED_EXTENSION 125alter table foo modify column aa int NOT NULL, add column z int; 126--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 127--error ER_UNSUPPORTED_EXTENSION 128alter table foo modify column aa bigint, add column z int; 129--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 130--error ER_UNSUPPORTED_EXTENSION 131alter table foo modify column aa varchar(20), add column z int; 132--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 133--error ER_UNSUPPORTED_EXTENSION 134alter table foo modify column aa int after cc, add column z int; 135 136--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 137--error ER_UNSUPPORTED_EXTENSION 138alter table foo change column aa aa int NOT NULL, drop column bb; 139--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 140--error ER_UNSUPPORTED_EXTENSION 141alter table foo change column aa aa bigint, drop column bb; 142--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 143--error ER_UNSUPPORTED_EXTENSION 144alter table foo change column aa aa varchar(20), drop column bb; 145--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 146--error ER_UNSUPPORTED_EXTENSION 147alter table foo change column aa aa int after cc, drop column bb; 148--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 149--error ER_UNSUPPORTED_EXTENSION 150alter table foo modify column aa int NOT NULL, drop column bb; 151--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 152--error ER_UNSUPPORTED_EXTENSION 153alter table foo modify column aa bigint, drop column bb; 154--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 155--error ER_UNSUPPORTED_EXTENSION 156alter table foo modify column aa varchar(20), drop column bb; 157--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ 158--error ER_UNSUPPORTED_EXTENSION 159alter table foo modify column aa int after cc, drop column bb; 160 161 162 163drop table foo; 164drop table bar; 165 166