diff options
author | jimw@mysql.com <> | 2005-01-13 18:22:35 +0100 |
---|---|---|
committer | jimw@mysql.com <> | 2005-01-13 18:22:35 +0100 |
commit | d63dc891c1a8cd72316ab221537c7d66df3cedfb (patch) | |
tree | 3b07a4fe42380db195f53c3c2236b030be226dcb /mysql-test/t/show_check.test | |
parent | f28a18c2d5f57359d0e212db8d48e3c29144e90d (diff) | |
download | mariadb-git-d63dc891c1a8cd72316ab221537c7d66df3cedfb.tar.gz |
Add test cases to verify that SHOW CREATE TABLE always outputs the
key algorithm for keys where they were explicitly specified.
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r-- | mysql-test/t/show_check.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 7788215dd27..cd8d4dba6ab 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -321,3 +321,35 @@ flush privileges; #--replace_column 7 # 8 # 9 # #show table status from `ä` LIKE 'ä'; #drop database `ä`; + +# Test that USING <keytype> is always shown in SHOW CREATE TABLE when it was +# specified during table creation, but not otherwise. (Bug #7235) +CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# Test that when an index is created with the default key algorithm and +# altered to another storage engine, it gets the default key algorithm +# for that storage engine, but when it is specified, the specified type is +# preserved. +CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ENGINE=MEMORY; +SHOW CREATE TABLE t1; +DROP TABLE t1; +CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ENGINE=MEMORY; +SHOW CREATE TABLE t1; +DROP TABLE t1; |