Commit ded75678 authored by Rich Prohaska's avatar Rich Prohaska

refs #5516 fix alter column binary tests

git-svn-id: file:///svn/mysql/tests/mysql-test@48741 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0484a8c3
...@@ -3,13 +3,11 @@ SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON; ...@@ -3,13 +3,11 @@ SET SESSION TOKUDB_DISABLE_SLOW_ALTER=ON;
SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB'; SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB';
CREATE TABLE t (a BINARY(100), b BINARY(200), KEY(a), KEY(b)); CREATE TABLE t (a BINARY(100), b BINARY(200), KEY(a), KEY(b));
ALTER TABLE t CHANGE COLUMN a a BINARY(100); ALTER TABLE t CHANGE COLUMN a a BINARY(100);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a BINARY(1); ALTER TABLE t CHANGE COLUMN a a BINARY(1);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a BINARY(255); ALTER TABLE t CHANGE COLUMN a a BINARY(255);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN b b BINARY(200); ALTER TABLE t CHANGE COLUMN b b BINARY(200);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN b b BINARY(1); ALTER TABLE t CHANGE COLUMN b b BINARY(1);
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN b b BINARY(255); ALTER TABLE t CHANGE COLUMN b b BINARY(255);
......
...@@ -9,28 +9,27 @@ SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB'; ...@@ -9,28 +9,27 @@ SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB';
CREATE TABLE t (a BINARY(100), b BINARY(200), KEY(a), KEY(b)); CREATE TABLE t (a BINARY(100), b BINARY(200), KEY(a), KEY(b));
# fill_alter_inplace_info bug, handler_flags == ALTER_COLUMN_TYPE + ALTER_COLUMN_DEFAULT, so we fail it
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a a BINARY(100); ALTER TABLE t CHANGE COLUMN a a BINARY(100);
# no shrinkage and a is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a a BINARY(1); ALTER TABLE t CHANGE COLUMN a a BINARY(1);
# a is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a a BINARY(255); ALTER TABLE t CHANGE COLUMN a a BINARY(255);
# fill_alter_inplace_info bug, handler_flags == ALTER_COLUMN_TYPE + ALTER_COLUMN_DEFAULT, so we fail it # no type change to b
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN b b BINARY(200); ALTER TABLE t CHANGE COLUMN b b BINARY(200);
# no shrinkage and b is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN b b BINARY(1); ALTER TABLE t CHANGE COLUMN b b BINARY(1);
# b is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN b b BINARY(255); ALTER TABLE t CHANGE COLUMN b b BINARY(255);
...@@ -39,10 +38,12 @@ DROP TABLE t; ...@@ -39,10 +38,12 @@ DROP TABLE t;
CREATE TABLE t (a BINARY(1), b BINARY(2), KEY(a,b)); CREATE TABLE t (a BINARY(1), b BINARY(2), KEY(a,b));
# a is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN a a BINARY(3); ALTER TABLE t CHANGE COLUMN a a BINARY(3);
# b is part of a key
--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/ --replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
--error ER_UNSUPPORTED_EXTENSION --error ER_UNSUPPORTED_EXTENSION
ALTER TABLE t CHANGE COLUMN b b BINARY(3); ALTER TABLE t CHANGE COLUMN b b BINARY(3);
......
...@@ -6,7 +6,7 @@ def gen_test(n): ...@@ -6,7 +6,7 @@ def gen_test(n):
for v in [ 'hi', 'there', 'people' ]: for v in [ 'hi', 'there', 'people' ]:
print "INSERT INTO t VALUES ('%s');" % (v) print "INSERT INTO t VALUES ('%s');" % (v)
for i in range(2,256): for i in range(2,256):
if 1: # if i < n: if i != n: # if i < n:
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/" print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--error ER_UNSUPPORTED_EXTENSION" print "--error ER_UNSUPPORTED_EXTENSION"
else: else:
...@@ -16,7 +16,7 @@ def gen_test(n): ...@@ -16,7 +16,7 @@ def gen_test(n):
print "ALTER TABLE ti CHANGE COLUMN a b BINARY(%d);" % (i) print "ALTER TABLE ti CHANGE COLUMN a b BINARY(%d);" % (i)
print "ALTER TABLE ti CHANGE COLUMN b a BINARY(%d);" % (i) print "ALTER TABLE ti CHANGE COLUMN b a BINARY(%d);" % (i)
print "ALTER TABLE t CHANGE COLUMN a b BINARY(%d);" % (i) print "ALTER TABLE t CHANGE COLUMN a b BINARY(%d);" % (i)
if 1: # if i < n: if i != n: # if i < n:
pass pass
else: else:
print "ALTER TABLE t CHANGE COLUMN b a BINARY(%d);" % (i) print "ALTER TABLE t CHANGE COLUMN b a BINARY(%d);" % (i)
...@@ -26,7 +26,7 @@ def gen_test(n): ...@@ -26,7 +26,7 @@ def gen_test(n):
print "DROP TABLE t;" print "DROP TABLE t;"
def main(): def main():
print "# this test is generated by change_bin_rename.py" print "# this test is generated by change_char_rename.py"
print "# test char expansion + rename is hot" print "# test char expansion + rename is hot"
print "--disable_warnings" print "--disable_warnings"
print "DROP TABLE IF EXISTS t,ti;" print "DROP TABLE IF EXISTS t,ti;"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment