diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2004-03-26 17:01:55 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2004-03-26 17:01:55 +0200 |
commit | 13e6d00840932ebbe98213c0f4255329e76010ba (patch) | |
tree | 41634d91bd72010922b7ab01ad4265c46c248f91 /mysql-test | |
parent | 8a6ae8395d789c6b8ad0a0f99454e1c4b709074c (diff) | |
parent | 9cc7549518ac18b095895b18569ddcf58a392a9a (diff) | |
download | mariadb-git-13e6d00840932ebbe98213c0f4255329e76010ba.tar.gz |
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/order_by.result | 8 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 13 |
2 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 093633d5f5a..859d9d4cab0 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -546,3 +546,11 @@ CREATE TABLE t1 (a INT, b INT); SET @id=0; UPDATE t1 SET a=0 ORDER BY (a=@id), b; DROP TABLE t1; +create table t1(id int not null auto_increment primary key, t char(12)); +explain select id,t from t1 order by id; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 1000 Using filesort +explain select id,t from t1 force index (primary) order by id; +table type possible_keys key key_len ref rows Extra +t1 index NULL PRIMARY 4 NULL 1000 +drop table t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 8215ec84ae3..86ecc4aa70d 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -352,4 +352,15 @@ CREATE TABLE t1 (a INT, b INT); SET @id=0; UPDATE t1 SET a=0 ORDER BY (a=@id), b; DROP TABLE t1; - +create table t1(id int not null auto_increment primary key, t char(12)); +disable_query_log; +let $1 = 1000; +while ($1) + { + eval insert into t1(t) values ('$1'); + dec $1; + } +enable_query_log; +explain select id,t from t1 order by id; +explain select id,t from t1 force index (primary) order by id; +drop table t1;
\ No newline at end of file |