mariadb/mysql-test/suite/tokudb.change_column/r/change_int.result

471 lines
15 KiB
Text
Raw Normal View History

DROP TABLE IF EXISTS t, ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a TINYINT;
ALTER TABLE t CHANGE COLUMN a a TINYINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a SMALLINT;
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT;
ALTER TABLE t CHANGE COLUMN a a INT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT;
ALTER TABLE t CHANGE COLUMN a a BIGINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT);
ALTER TABLE t CHANGE COLUMN a a TINYINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a SMALLINT;
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT;
ALTER TABLE t CHANGE COLUMN a a INT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT;
ALTER TABLE t CHANGE COLUMN a a BIGINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
ALTER TABLE t CHANGE COLUMN a a TINYINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT;
ALTER TABLE t CHANGE COLUMN a a INT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT;
ALTER TABLE t CHANGE COLUMN a a BIGINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a INT);
ALTER TABLE t CHANGE COLUMN a a TINYINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a INT);
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a INT);
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT;
ALTER TABLE t CHANGE COLUMN a a INT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT;
ALTER TABLE t CHANGE COLUMN a a BIGINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a BIGINT);
ALTER TABLE t CHANGE COLUMN a a TINYINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT);
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT);
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT);
ALTER TABLE t CHANGE COLUMN a a INT;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
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 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT;
ALTER TABLE t CHANGE COLUMN a a BIGINT;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a TINYINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a SMALLINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a SMALLINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
CREATE TABLE ti LIKE t;
ALTER TABLE ti ENGINE=myisam;
INSERT INTO ti SELECT * from t;
ALTER TABLE ti CHANGE COLUMN a a BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
include/diff_tables.inc [test.t, test.ti]
DROP TABLE ti;
DROP TABLE t;