diff options
author | unknown <monty@mashka.mysql.fi> | 2003-07-01 13:09:24 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-07-01 13:09:24 +0300 |
commit | 1726ae86be52bc129b5788406d60808b15b8bd9f (patch) | |
tree | 70fbaea028f6bbf6ba895a7dfb5eca914c106904 /mysql-test | |
parent | f6d3f0790c953eb1b72e1468d290ece66aeb9940 (diff) | |
parent | caddb5ea53cbde18bf0a915bc4867fecd93c55d5 (diff) | |
download | mariadb-git-1726ae86be52bc129b5788406d60808b15b8bd9f.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-3.23
into mashka.mysql.fi:/home/my/mysql-3.23
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/order_by.result | 4 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 1a292b1203c..d45ae6b6dec 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -142,3 +142,7 @@ t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort t3 eq_ref PRIMARY PRIMARY 2 t1.skr 1 where used +t2_id str +112633 t2 112633 +112634 t2 112634 +t2_id str diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 16094206745..d6be4c1c45c 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -247,3 +247,26 @@ EXPLAIN SELECT t1.gid, t2.sid, t3.uid from t2, t1, t3 where t2.gid = t1.gid and EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t3.skr,t1.gid; EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.skr = t3.uid order by t1.gid,t3.skr; drop table t1,t2,t3; + +# +# Problem with lookup on NULL (Bug 479) +# + +CREATE TABLE t1 ( + t1_id int(10) unsigned NOT NULL default '0', + ref_id int(10) unsigned default NULL, + PRIMARY KEY (t1_id) +) TYPE=MyISAM; +INSERT INTO t1 VALUES (2401,14590),(2425,NULL); +CREATE TABLE t2 ( + t2_id int(10) unsigned NOT NULL default '0', + ref_id int(10) unsigned NOT NULL default '0', + str varchar(20) default NULL, + PRIMARY KEY (t2_id), + KEY ref_id (ref_id) +) TYPE=MyISAM; +INSERT INTO t2 VALUES (112633,14590,'t2 112633'),(112634,14590,'t2 112634'),(113166,14641,'t2 113166'),(113167,14641,'t2 113167'),(113168,14641,'t2 113168'),(113169,14641,'t2 113169'),(113170,14641,'t2 113170'),(113171,14641,'t2 113171'),(113172,14641,'t2 113172'),(113173,14641,'t2 113173'),(113174,14641,'t2 113174'),(113175,14641,'t2 113175'),(113436,14674,'t2 113436'),(113437,14674,'t2 113437'),(113486,14689,'t2 113486'),(113487,14689,'t2 113487'),(113488,14689,'t2 113488'),(113489,14689,'t2 113489'),(113504,14795,'t2 113504'),(115396,15024,'t2 115396'),(115397,15024,'t2 115397'); +SELECT t2_id, str FROM t1, t2 WHERE t1_id = 2401 AND t1.ref_id = t2.ref_id ORDER BY str, t2_id; +# This one gave an error +SELECT t2_id, str FROM t1, t2 WHERE t1_id = 2425 AND t1.ref_id = t2.ref_id ORDER BY str, t2_id; +DROP TABLE t1,t2; |