DROP TABLE IF EXISTS t; SET SESSION DEFAULT_STORAGE_ENGINE="TokuDB"; SET SESSION TOKUDB_DISABLE_SLOW_ALTER=1; CREATE TABLE t (a TINYINT); INSERT INTO t VALUES ( -128 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 127 ); ALTER TABLE t CHANGE COLUMN a a TINYINT; SELECT * FROM t; a -128 -1 0 1 127 DROP TABLE t; CREATE TABLE t (a TINYINT); INSERT INTO t VALUES ( -128 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 127 ); ALTER TABLE t CHANGE COLUMN a a SMALLINT; SELECT * FROM t; a -128 -1 0 1 127 DROP TABLE t; CREATE TABLE t (a TINYINT); INSERT INTO t VALUES ( -128 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 127 ); ALTER TABLE t CHANGE COLUMN a a MEDIUMINT; SELECT * FROM t; a -128 -1 0 1 127 DROP TABLE t; CREATE TABLE t (a TINYINT); INSERT INTO t VALUES ( -128 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 127 ); ALTER TABLE t CHANGE COLUMN a a INT; SELECT * FROM t; a -128 -1 0 1 127 DROP TABLE t; CREATE TABLE t (a TINYINT); INSERT INTO t VALUES ( -128 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 127 ); ALTER TABLE t CHANGE COLUMN a a BIGINT; SELECT * FROM t; a -128 -1 0 1 127 DROP TABLE t; CREATE TABLE t (a SMALLINT); INSERT INTO t VALUES ( -32768 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 32767 ); ALTER TABLE t CHANGE COLUMN a a TINYINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -32768 -1 0 1 32767 DROP TABLE t; CREATE TABLE t (a SMALLINT); INSERT INTO t VALUES ( -32768 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 32767 ); ALTER TABLE t CHANGE COLUMN a a SMALLINT; SELECT * FROM t; a -32768 -1 0 1 32767 DROP TABLE t; CREATE TABLE t (a SMALLINT); INSERT INTO t VALUES ( -32768 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 32767 ); ALTER TABLE t CHANGE COLUMN a a MEDIUMINT; SELECT * FROM t; a -32768 -1 0 1 32767 DROP TABLE t; CREATE TABLE t (a SMALLINT); INSERT INTO t VALUES ( -32768 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 32767 ); ALTER TABLE t CHANGE COLUMN a a INT; SELECT * FROM t; a -32768 -1 0 1 32767 DROP TABLE t; CREATE TABLE t (a SMALLINT); INSERT INTO t VALUES ( -32768 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 32767 ); ALTER TABLE t CHANGE COLUMN a a BIGINT; SELECT * FROM t; a -32768 -1 0 1 32767 DROP TABLE t; CREATE TABLE t (a MEDIUMINT); INSERT INTO t VALUES ( -8388608 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 8388607 ); ALTER TABLE t CHANGE COLUMN a a TINYINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -8388608 -1 0 1 8388607 DROP TABLE t; CREATE TABLE t (a MEDIUMINT); INSERT INTO t VALUES ( -8388608 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 8388607 ); ALTER TABLE t CHANGE COLUMN a a SMALLINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -8388608 -1 0 1 8388607 DROP TABLE t; CREATE TABLE t (a MEDIUMINT); INSERT INTO t VALUES ( -8388608 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 8388607 ); ALTER TABLE t CHANGE COLUMN a a MEDIUMINT; SELECT * FROM t; a -8388608 -1 0 1 8388607 DROP TABLE t; CREATE TABLE t (a MEDIUMINT); INSERT INTO t VALUES ( -8388608 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 8388607 ); ALTER TABLE t CHANGE COLUMN a a INT; SELECT * FROM t; a -8388608 -1 0 1 8388607 DROP TABLE t; CREATE TABLE t (a MEDIUMINT); INSERT INTO t VALUES ( -8388608 ); INSERT INTO t VALUES ( -1 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 8388607 ); ALTER TABLE t CHANGE COLUMN a a BIGINT; SELECT * FROM t; a -8388608 -1 0 1 8388607 DROP TABLE t; CREATE TABLE t (a INT); INSERT INTO t VALUES ( -2147483648 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 2147483647 ); ALTER TABLE t CHANGE COLUMN a a TINYINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -2147483648 0 1 2147483647 DROP TABLE t; CREATE TABLE t (a INT); INSERT INTO t VALUES ( -2147483648 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 2147483647 ); ALTER TABLE t CHANGE COLUMN a a SMALLINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -2147483648 0 1 2147483647 DROP TABLE t; CREATE TABLE t (a INT); INSERT INTO t VALUES ( -2147483648 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 2147483647 ); ALTER TABLE t CHANGE COLUMN a a MEDIUMINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -2147483648 0 1 2147483647 DROP TABLE t; CREATE TABLE t (a INT); INSERT INTO t VALUES ( -2147483648 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 2147483647 ); ALTER TABLE t CHANGE COLUMN a a INT; SELECT * FROM t; a -2147483648 0 1 2147483647 DROP TABLE t; CREATE TABLE t (a INT); INSERT INTO t VALUES ( -2147483648 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 2147483647 ); ALTER TABLE t CHANGE COLUMN a a BIGINT; SELECT * FROM t; a -2147483648 0 1 2147483647 DROP TABLE t; CREATE TABLE t (a BIGINT); INSERT INTO t VALUES ( -9223372036854775808 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 9223372036854775807 ); ALTER TABLE t CHANGE COLUMN a a TINYINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -9223372036854775808 0 1 9223372036854775807 DROP TABLE t; CREATE TABLE t (a BIGINT); INSERT INTO t VALUES ( -9223372036854775808 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 9223372036854775807 ); ALTER TABLE t CHANGE COLUMN a a SMALLINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -9223372036854775808 0 1 9223372036854775807 DROP TABLE t; CREATE TABLE t (a BIGINT); INSERT INTO t VALUES ( -9223372036854775808 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 9223372036854775807 ); ALTER TABLE t CHANGE COLUMN a a MEDIUMINT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -9223372036854775808 0 1 9223372036854775807 DROP TABLE t; CREATE TABLE t (a BIGINT); INSERT INTO t VALUES ( -9223372036854775808 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 9223372036854775807 ); ALTER TABLE t CHANGE COLUMN a a INT; ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version SELECT * FROM t; a -9223372036854775808 0 1 9223372036854775807 DROP TABLE t; CREATE TABLE t (a BIGINT); INSERT INTO t VALUES ( -9223372036854775808 ); INSERT INTO t VALUES ( 0 ); INSERT INTO t VALUES ( 1 ); INSERT INTO t VALUES ( 9223372036854775807 ); ALTER TABLE t CHANGE COLUMN a a BIGINT; SELECT * FROM t; a -9223372036854775808 0 1 9223372036854775807 DROP TABLE t;