mariadb/mysql-test/suite/tokudb.change_column/r/change_uint.result
Rich Prohaska 19999b8a54 refs #5334 some int expansion test cases
git-svn-id: file:///svn/mysql/tests/mysql-test@47568 c7de825b-a66e-492c-adef-691d508d4ae1
2012-09-07 12:09:49 +00:00

288 lines
6.4 KiB
Text

DROP TABLE IF EXISTS t;
SET SESSION DEFAULT_STORAGE_ENGINE="TokuDB";
SET SESSION TOKUDB_DISABLE_SLOW_ALTER=1;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
SELECT * FROM t;
a
0
1
255
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
SELECT * FROM t;
a
0
1
255
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
SELECT * FROM t;
a
0
1
255
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
SELECT * FROM t;
a
0
1
255
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 255 );
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
SELECT * FROM t;
a
0
1
255
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
65535
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
SELECT * FROM t;
a
0
1
65535
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
SELECT * FROM t;
a
0
1
65535
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
SELECT * FROM t;
a
0
1
65535
DROP TABLE t;
CREATE TABLE t (a SMALLINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 65535 );
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
SELECT * FROM t;
a
0
1
65535
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
16777215
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
16777215
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
SELECT * FROM t;
a
0
1
16777215
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
SELECT * FROM t;
a
0
1
16777215
DROP TABLE t;
CREATE TABLE t (a MEDIUMINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 16777215 );
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
SELECT * FROM t;
a
0
1
16777215
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
4294967295
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
4294967295
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
4294967295
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
SELECT * FROM t;
a
0
1
4294967295
DROP TABLE t;
CREATE TABLE t (a INT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 4294967295 );
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
SELECT * FROM t;
a
0
1
4294967295
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
18446744073709551615
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
18446744073709551615
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
18446744073709551615
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
SELECT * FROM t;
a
0
1
18446744073709551615
DROP TABLE t;
CREATE TABLE t (a BIGINT UNSIGNED);
INSERT INTO t VALUES ( 0 );
INSERT INTO t VALUES ( 1 );
INSERT INTO t VALUES ( 18446744073709551615 );
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED;
SELECT * FROM t;
a
0
1
18446744073709551615
DROP TABLE t;