mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
refs #5334 some int expansion test cases
git-svn-id: file:///svn/mysql/tests/mysql-test@47568 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
34d888fcb6
commit
2a18b548b6
5 changed files with 1183 additions and 0 deletions
368
mysql-test/suite/tokudb.change_column/r/change_int.result
Normal file
368
mysql-test/suite/tokudb.change_column/r/change_int.result
Normal file
|
@ -0,0 +1,368 @@
|
|||
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;
|
288
mysql-test/suite/tokudb.change_column/r/change_uint.result
Normal file
288
mysql-test/suite/tokudb.change_column/r/change_uint.result
Normal file
|
@ -0,0 +1,288 @@
|
|||
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;
|
35
mysql-test/suite/tokudb.change_column/t/change_int.py
Normal file
35
mysql-test/suite/tokudb.change_column/t/change_int.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# generate alter table test cases for integer types
|
||||
|
||||
import sys
|
||||
def gen_matrix(types, values):
|
||||
print "# this test is generated by change_int.py"
|
||||
print "--disable_warnings"
|
||||
print "DROP TABLE IF EXISTS t;"
|
||||
print "--enable_warnings"
|
||||
print "SET SESSION DEFAULT_STORAGE_ENGINE=\"TokuDB\";"
|
||||
print "SET SESSION TOKUDB_DISABLE_SLOW_ALTER=1;"
|
||||
for a in range(len(types)):
|
||||
for b in range(len(types)):
|
||||
print
|
||||
print "CREATE TABLE t (a %s);" % (types[a])
|
||||
for x in values[a]:
|
||||
print "INSERT INTO t VALUES (", x, ");"
|
||||
if a > b:
|
||||
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
|
||||
print "--error ER_UNSUPPORTED_EXTENSION"
|
||||
print "ALTER TABLE t CHANGE COLUMN a a %s;" % (types[b])
|
||||
print "SELECT * FROM t;"
|
||||
print "DROP TABLE t;"
|
||||
def main():
|
||||
gen_matrix(
|
||||
[ "TINYINT", "SMALLINT", "MEDIUMINT", "INT", "BIGINT" ],
|
||||
[ [ -128, -1, 0, 1, 127 ], [ -32768, -1, 0, 1, 32767], [-8388608, -1, 0, 1, 8388607], [-2147483648, 0, 1, 2147483647], [-9223372036854775808, 0, 1, 9223372036854775807] ]
|
||||
)
|
||||
gen_matrix(
|
||||
[ "TINYINT UNSIGNED", "SMALLINT UNSIGNED", "MEDIUMINT UNSIGNED", "INT UNSIGNED", "BIGINT UNSIGNED" ],
|
||||
[ [ 0, 1, 255 ], [ 0, 1, 65535], [0, 1, 16777215], [0, 1, 4294967295], [0, 1, 18446744073709551615] ]
|
||||
)
|
||||
return 0
|
||||
sys.exit(main())
|
266
mysql-test/suite/tokudb.change_column/t/change_int.test
Normal file
266
mysql-test/suite/tokudb.change_column/t/change_int.test
Normal file
|
@ -0,0 +1,266 @@
|
|||
# this test is generated by change_int.py
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t;
|
||||
--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 );
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT;
|
||||
SELECT * FROM t;
|
||||
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 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a INT;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
DROP TABLE t;
|
226
mysql-test/suite/tokudb.change_column/t/change_uint.test
Normal file
226
mysql-test/suite/tokudb.change_column/t/change_uint.test
Normal file
|
@ -0,0 +1,226 @@
|
|||
# this test is generated by change_int.py
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t;
|
||||
--enable_warnings
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a SMALLINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 65535 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a MEDIUMINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 16777215 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a MEDIUMINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 16777215 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a INT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 4294967295 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a INT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 4294967295 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a INT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 4294967295 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
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;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a BIGINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 18446744073709551615 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a BIGINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 18446744073709551615 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a BIGINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 18446744073709551615 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t (a BIGINT UNSIGNED);
|
||||
INSERT INTO t VALUES ( 0 );
|
||||
INSERT INTO t VALUES ( 1 );
|
||||
INSERT INTO t VALUES ( 18446744073709551615 );
|
||||
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
||||
--error ER_UNSUPPORTED_EXTENSION
|
||||
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED;
|
||||
SELECT * FROM t;
|
||||
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;
|
||||
DROP TABLE t;
|
Loading…
Add table
Reference in a new issue