mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
Merge mbp.local:/Users/kaa/src/opt/bug25162/my51-bug25162
into mbp.local:/Users/kaa/src/opt/mysql-5.1-opt
This commit is contained in:
commit
0879b1a69b
2 changed files with 38 additions and 0 deletions
|
@ -1545,6 +1545,20 @@ 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
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
insert into t1 values (1,1),(1,2);
|
||||
|
|
|
@ -1152,6 +1152,30 @@ create table t2 select sql_big_result f1,count(f2) from t1 group by f1;
|
|||
show status like 'handler_read%';
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs on table creates
|
||||
#
|
||||
|
||||
# Show that the old syntax for index type is supported
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
|
||||
DROP TABLE t1;
|
||||
|
||||
# Show that the new syntax for index type is supported
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
|
||||
DROP TABLE t1;
|
||||
|
||||
# Show that in case of multiple index type definitions, the last one takes
|
||||
# precedence
|
||||
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
|
||||
SHOW INDEX FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
|
||||
SHOW INDEX FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue