# This test takes rather long time so let us run it only in --big-test mode --source include/big_test.inc --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; let $diff_tables= test.foo, test.bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a; alter table bar drop column a; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column b; alter table bar drop column b; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column c; alter table bar drop column c; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column d; alter table bar drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column b; alter table bar drop column a, drop column b; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column c; alter table bar drop column a, drop column c; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column d; alter table bar drop column a, drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column b, drop column a; alter table bar drop column b, drop column a; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column b, drop column c; alter table bar drop column b, drop column c; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column b, drop column d; alter table bar drop column b, drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column c, drop column a; alter table bar drop column c, drop column a; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column c, drop column b; alter table bar drop column c, drop column b; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column c, drop column d; alter table bar drop column c, drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column d, drop column a; alter table bar drop column d, drop column a; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column d, drop column b; alter table bar drop column d, drop column b; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column d, drop column c; alter table bar drop column d, drop column c; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column b, drop column c; alter table bar drop column a, drop column b, drop column c; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column b, drop column d; alter table bar drop column a, drop column b, drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column a, drop column c, drop column d; alter table bar drop column a, drop column c, drop column d; source include/diff_tables.inc; drop table foo; drop table bar; create table foo (a int, b bigint, c date, d tinyint) engine=TokuDB; create table bar like foo; alter table bar engine=MyISAM; insert into foo values (NULL,NULL,NULL,NULL); insert into foo values (-1,NULL,'2008-1-1',NULL); insert into foo values (NULL,12345678987,NULL,1); insert into foo values (2,20,'1999-11-11',0); insert into bar select * from foo; source include/diff_tables.inc; alter table foo drop column b, drop column c, drop column d; alter table bar drop column b, drop column c, drop column d; source include/diff_tables.inc; drop table foo; drop table bar;