diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/gcc296.result | 15 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 27 | ||||
-rw-r--r-- | mysql-test/r/join_outer.result | 19 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 27 |
4 files changed, 88 insertions, 0 deletions
diff --git a/mysql-test/r/gcc296.result b/mysql-test/r/gcc296.result index 7184bfb9cdc..8f78f70cc1f 100644 --- a/mysql-test/r/gcc296.result +++ b/mysql-test/r/gcc296.result @@ -1,5 +1,20 @@ +drop table if exists obory; +CREATE TABLE obory ( +kodoboru varchar(10) default NULL, +obor tinytext, +aobor tinytext, +UNIQUE INDEX kodoboru (kodoboru), +FULLTEXT KEY obor (obor), +FULLTEXT KEY aobor (aobor) +); +INSERT INTO obory VALUES ('0101000000','aaa','AAA'); +INSERT INTO obory VALUES ('0102000000','bbb','BBB'); +INSERT INTO obory VALUES ('0103000000','ccc','CCC'); +INSERT INTO obory VALUES ('0104000000','xxx','XXX'); +select * from obory; kodoboru obor aobor 0101000000 aaa AAA 0102000000 bbb BBB 0103000000 ccc CCC 0104000000 xxx XXX +drop table obory; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index f0144af24a8..fce75e31708 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -873,3 +873,30 @@ select * from t1; a commit; drop table t1; +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=innodb; +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); +explain select * from t1 order by a; +table type possible_keys key key_len ref rows Extra +t1 index NULL PRIMARY 4 NULL 4 +explain select * from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 4 +explain select * from t1 order by c; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select a from t1 order by a; +table type possible_keys key key_len ref rows Extra +t1 index NULL PRIMARY 4 NULL 4 Using index +explain select b from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 4 Using index +explain select a,b from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 4 Using index +explain select a,b from t1; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 4 Using index +explain select a,b,c from t1; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 +drop table t1; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index e23ab27b6aa..9d3c152e516 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -633,3 +633,22 @@ SELECT * FROM t1 LEFT JOIN t2 ON (t1.bug_id = t2.bug_id AND t2.who = 2) WHERE bug_id reporter bug_id who 1 1 1 2 drop table t1,t2; +create table t1 (fooID smallint unsigned auto_increment, primary key (fooID)); +create table t2 (fooID smallint unsigned not null, barID smallint unsigned not null, primary key (fooID,barID)); +insert into t1 (fooID) values (10),(20),(30); +insert into t2 values (10,1),(20,2),(30,3); +explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; +table type possible_keys key key_len ref rows Extra +t2 index NULL PRIMARY 4 NULL 3 Using index +t1 eq_ref PRIMARY PRIMARY 2 const 1 where used; Using index +select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; +fooID barID fooID +10 1 NULL +20 2 NULL +30 3 30 +select * from t2 left join t1 ignore index(primary) on t1.fooID = t2.fooID and t1.fooID = 30; +fooID barID fooID +10 1 NULL +20 2 NULL +30 3 30 +drop table t1,t2; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 448c1b37592..efcc610cbd4 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -48,3 +48,30 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL drop table t1; +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=myisam; +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); +explain select * from t1 order by a; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select * from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select * from t1 order by c; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select a from t1 order by a; +table type possible_keys key key_len ref rows Extra +t1 index NULL PRIMARY 4 NULL 4 Using index +explain select b from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 4 Using index +explain select a,b from t1 order by b; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 Using filesort +explain select a,b from t1; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 +explain select a,b,c from t1; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 4 +drop table t1; |