summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
authorunknown <kaa@mbp.local>2008-02-01 13:00:40 +0500
committerunknown <kaa@mbp.local>2008-02-01 13:00:40 +0500
commit4d794c233419658cd79b416a3ce45d0b1efea688 (patch)
treedb2f46689e159d75cd24ebf189781616442b2aae /mysql-test/r/create.result
parentf80b593d21296245970460d5b95e240a1783afcf (diff)
downloadmariadb-git-4d794c233419658cd79b416a3ce45d0b1efea688.tar.gz
Fix for bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs
on table creates The problem was in incompatible syntax for key definition in CREATE TABLE. 5.0 supports only the following syntax for key definition (see "CREATE TABLE syntax" in the manual): {INDEX|KEY} [index_name] [index_type] (index_col_name,...) While 5.1 parser supports the above syntax, the "preferred" syntax was changed to: {INDEX|KEY} [index_name] (index_col_name,...) [index_type] The above syntax is used in 5.1 for the SHOW CREATE TABLE output, which led to dumps generated by 5.1 being incompatible with 5.0. Fixed by changing the parser in 5.0 to support both 5.0 and 5.1 syntax for key definition. mysql-test/r/create.result: Added a test case for bug #25162. mysql-test/t/create.test: Added a test case for bug #25162. sql/sql_yacc.yy: Changed the parser to support both 5.0 and 5.1 syntax for index type specification in CREATE TABLE.
Diffstat (limited to 'mysql-test/r/create.result')
-rw-r--r--mysql-test/r/create.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 3d7486b6ba2..53c2058f3ec 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1532,4 +1532,18 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 7
drop table t1,t2;
+CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
+DROP TABLE t1;
+CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
+DROP TABLE t1;
+CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 c1 1 c1 NULL 0 NULL NULL YES HASH
+DROP TABLE t1;
+CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 c1 1 c1 A NULL NULL NULL YES BTREE
+DROP TABLE t1;
End of 5.0 tests