1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  rakia.gmz:/home/kgeorge/mysql/autopush/B16590-5.1-opt


mysql-test/r/order_by.result:
  Auto merged
mysql-test/t/order_by.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
This commit is contained in:
unknown
2007-01-22 12:58:14 +02:00
3 changed files with 38 additions and 0 deletions

View File

@ -926,3 +926,12 @@ NULL
2
3
DROP TABLE t1,t2,t3,t4;
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE KEY b (b));
INSERT INTO t1 VALUES (1,1),(2,2);
CREATE TABLE t2 (a INT, b INT, KEY a (a,b));
INSERT INTO t2 VALUES (1,1),(1,2),(2,1),(2,2);
EXPLAIN SELECT 1 FROM t1,t2 WHERE t1.b=2 AND t1.a=t2.a ORDER BY t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY,b b 5 const 1
1 SIMPLE t2 ref a a 5 const 2 Using where; Using index
DROP TABLE t1,t2;