mariadb/mysql-test/suite/tokudb/t/change_column_int_rename.test
Rich Prohaska f66e34d0d7 refs #6440 move change column tests
git-svn-id: file:///svn/mysql/tests/mysql-test@55031 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-03 16:49:00 +00:00

414 lines
12 KiB
Text

# this test is generated by change_int_rename.py
--disable_warnings
DROP TABLE IF EXISTS t, ti;
--enable_warnings
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 aa TINYINT;
ALTER TABLE t CHANGE COLUMN a aa TINYINT;
ALTER TABLE t CHANGE COLUMN aa a TINYINT;
ALTER TABLE ti CHANGE COLUMN aa a TINYINT;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT;
DROP TABLE t;
CREATE TABLE t (a TINYINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT;
DROP TABLE t;
CREATE TABLE t (a TINYINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT;
DROP TABLE t;
CREATE TABLE t (a TINYINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT;
DROP TABLE t;
CREATE TABLE t (a SMALLINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT;
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 aa SMALLINT;
ALTER TABLE t CHANGE COLUMN a aa SMALLINT;
ALTER TABLE t CHANGE COLUMN aa a SMALLINT;
ALTER TABLE ti CHANGE COLUMN aa a SMALLINT;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT;
DROP TABLE t;
CREATE TABLE t (a SMALLINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT;
DROP TABLE t;
CREATE TABLE t (a SMALLINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT;
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 aa MEDIUMINT;
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT;
ALTER TABLE t CHANGE COLUMN aa a MEDIUMINT;
ALTER TABLE ti CHANGE COLUMN aa a MEDIUMINT;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT;
DROP TABLE t;
CREATE TABLE t (a INT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT;
DROP TABLE t;
CREATE TABLE t (a INT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT;
DROP TABLE t;
CREATE TABLE t (a INT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT;
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 aa INT;
ALTER TABLE t CHANGE COLUMN a aa INT;
ALTER TABLE t CHANGE COLUMN aa a INT;
ALTER TABLE ti CHANGE COLUMN aa a INT;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a INT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT;
DROP TABLE t;
CREATE TABLE t (a BIGINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT;
DROP TABLE t;
CREATE TABLE t (a BIGINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT;
DROP TABLE t;
CREATE TABLE t (a BIGINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT;
DROP TABLE t;
CREATE TABLE t (a BIGINT);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT;
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 aa BIGINT;
ALTER TABLE t CHANGE COLUMN a aa BIGINT;
ALTER TABLE t CHANGE COLUMN aa a BIGINT;
ALTER TABLE ti CHANGE COLUMN aa a BIGINT;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
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 aa TINYINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a aa TINYINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN aa a TINYINT UNSIGNED;
ALTER TABLE ti CHANGE COLUMN aa a TINYINT UNSIGNED;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT UNSIGNED;
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 aa SMALLINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a aa SMALLINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN aa a SMALLINT UNSIGNED;
ALTER TABLE ti CHANGE COLUMN aa a SMALLINT UNSIGNED;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT UNSIGNED;
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 aa MEDIUMINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN aa a MEDIUMINT UNSIGNED;
ALTER TABLE ti CHANGE COLUMN aa a MEDIUMINT UNSIGNED;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT UNSIGNED;
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 aa INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a aa INT UNSIGNED;
ALTER TABLE t CHANGE COLUMN aa a INT UNSIGNED;
ALTER TABLE ti CHANGE COLUMN aa a INT UNSIGNED;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa BIGINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa TINYINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa SMALLINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa MEDIUMINT UNSIGNED;
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a aa INT UNSIGNED;
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 aa BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN a aa BIGINT UNSIGNED;
ALTER TABLE t CHANGE COLUMN aa a BIGINT UNSIGNED;
ALTER TABLE ti CHANGE COLUMN aa a BIGINT UNSIGNED;
let $diff_tables = test.t, test.ti;
source include/diff_tables.inc;
DROP TABLE ti;
DROP TABLE t;