Commit 05414936 authored by Rich Prohaska's avatar Rich Prohaska

refs #5607 test cases for hot text/blob expansion

git-svn-id: file:///svn/mysql/tests/mysql-test@48857 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0d387b85
This diff is collapsed.
This diff is collapsed.
import sys
def main():
print "# this test is generated by change_blob.py"
print "# generate hot blob expansion test cases"
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;"
gen_tests([ "TINY", "", "MEDIUM", "LONG" ], [ "NULL", "NOT NULL"])
return 0
def gen_tests(base_types, null_types):
for from_index in range(len(base_types)):
for to_index in range(len(base_types)):
for from_null in range(len(null_types)):
for to_null in range(len(null_types)):
print "CREATE TABLE t (a %sBLOB %s);" % (base_types[from_index], null_types[from_null])
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--error ER_UNSUPPORTED_EXTENSION"
print "ALTER TABLE t CHANGE COLUMN a a %sTEXT %s;" % (base_types[to_index], null_types[to_null]);
if from_null != to_null or from_index > to_index:
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--error ER_UNSUPPORTED_EXTENSION"
print "ALTER TABLE t CHANGE COLUMN a a %sBLOB %s;" % (base_types[to_index], null_types[to_null]);
print "DROP TABLE t;"
sys.exit(main())
This diff is collapsed.
import sys
def main():
print "# this test is generated by change_text.py"
print "# generate hot text expansion test cases"
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;"
gen_tests([ "TINY", "", "MEDIUM", "LONG" ], [ "NULL", "NOT NULL"])
return 0
def gen_tests(base_types, null_types):
for from_index in range(len(base_types)):
for to_index in range(len(base_types)):
for from_null in range(len(null_types)):
for to_null in range(len(null_types)):
print "CREATE TABLE t (a %sTEXT %s);" % (base_types[from_index], null_types[from_null])
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--error ER_UNSUPPORTED_EXTENSION"
print "ALTER TABLE t CHANGE COLUMN a a %sBLOB %s;" % (base_types[to_index], null_types[to_null]);
if from_null != to_null or from_index > to_index:
print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/"
print "--error ER_UNSUPPORTED_EXTENSION"
print "ALTER TABLE t CHANGE COLUMN a a %sTEXT %s;" % (base_types[to_index], null_types[to_null]);
print "DROP TABLE t;"
sys.exit(main())
This diff is collapsed.
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