diff options
Diffstat (limited to 'mysql-test/r/heap_btree.result')
-rw-r--r-- | mysql-test/r/heap_btree.result | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result index 4e101229b0e..c3080389999 100644 --- a/mysql-test/r/heap_btree.result +++ b/mysql-test/r/heap_btree.result @@ -94,7 +94,7 @@ select max(a) from t1; max(a) 1 drop table t1; -CREATE TABLE t1 ( a int not null default 0, b int not null default 0, key using BTREE (a), key using BTREE (b) ) TYPE=HEAP; +CREATE TABLE t1 ( a int not null default 0, b int not null default 0, key using BTREE (a,b), key using BTREE (b) ) TYPE=HEAP; insert into t1 values(1,1),(1,2),(2,3),(1,3),(1,4),(1,5),(1,6); select * from t1 where a=1; a b @@ -108,17 +108,30 @@ insert into t1 values(1,1),(1,2),(2,3),(1,3),(1,4),(1,5),(1,6); select * from t1 where a=1; a b 1 1 -1 2 -1 3 -1 4 -1 5 -1 6 1 1 1 2 +1 2 1 3 +1 3 +1 4 1 4 1 5 +1 5 +1 6 1 6 +explain select * from tx where a=x order by a,b; +table type possible_keys key key_len ref rows Extra +tx ref a a x const x where used +explain select * from tx where a=x order by b; +table type possible_keys key key_len ref rows Extra +tx ref a a x const x where used +select * from t1 where b=1; +a b +1 1 +1 1 +explain select * from tx where b=x; +table type possible_keys key key_len ref rows Extra +tx ref b b x const x where used drop table t1; create table t1 (id int unsigned not null, primary key using BTREE (id)) type=HEAP; insert into t1 values(1); |