mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 07:14:17 +01:00
f66e34d0d7
git-svn-id: file:///svn/mysql/tests/mysql-test@55031 c7de825b-a66e-492c-adef-691d508d4ae1
53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
# test that expansion of a binary field in a key is not supported
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t;
|
|
--enable_warnings
|
|
|
|
SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON;
|
|
SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB';
|
|
|
|
CREATE TABLE t (a BINARY(100), b BINARY(200), KEY(a), KEY(b));
|
|
|
|
ALTER TABLE t CHANGE COLUMN a a BINARY(100);
|
|
|
|
# no shrinkage and a is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN a a BINARY(1);
|
|
|
|
# a is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN a a BINARY(255);
|
|
|
|
# no type change to b
|
|
ALTER TABLE t CHANGE COLUMN b b BINARY(200);
|
|
|
|
# no shrinkage and b is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN b b BINARY(1);
|
|
|
|
# b is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN b b BINARY(255);
|
|
|
|
DROP TABLE t;
|
|
|
|
CREATE TABLE t (a BINARY(1), b BINARY(2), KEY(a,b));
|
|
|
|
# a is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN a a BINARY(3);
|
|
|
|
# b is part of a key
|
|
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
|
|
--error ER_UNSUPPORTED_EXTENSION
|
|
ALTER TABLE t CHANGE COLUMN b b BINARY(3);
|
|
|
|
DROP TABLE t;
|
|
|
|
|