summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-10-16 16:34:29 +0300
committermonty@hundin.mysql.fi <>2002-10-16 16:34:29 +0300
commit26b1bbdbd1f630c68025a5b5ac565067ef1747dc (patch)
tree7e8b3a279aef52d26da9843f1c45ff38112391f2 /mysql-test/t
parent8c85663c5569bf6d923adfe9f7552b6bae185eaa (diff)
parent67d3cd643b00d78e7236200f31efa9ec57a2083a (diff)
downloadmariadb-git-26b1bbdbd1f630c68025a5b5ac565067ef1747dc.tar.gz
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/null_key.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test
index e5d8fc59e4f..3ab8b993f43 100644
--- a/mysql-test/t/null_key.test
+++ b/mysql-test/t/null_key.test
@@ -91,3 +91,47 @@ DELETE FROM t2 WHERE uniq_id IS NULL;
SELECT * FROM t1 ORDER BY uniq_id, id;
SELECT * FROM t2 ORDER BY uniq_id, id;
DROP table t1,t2;
+
+#
+# This crashed MySQL 3.23.47
+#
+
+CREATE TABLE `t1` (
+ `order_id` char(32) NOT NULL default '',
+ `product_id` char(32) NOT NULL default '',
+ `product_type` int(11) NOT NULL default '0',
+ PRIMARY KEY (`order_id`,`product_id`,`product_type`)
+) TYPE=MyISAM;
+CREATE TABLE `t2` (
+ `order_id` char(32) NOT NULL default '',
+ `product_id` char(32) NOT NULL default '',
+ `product_type` int(11) NOT NULL default '0',
+ PRIMARY KEY (`order_id`,`product_id`,`product_type`)
+) TYPE=MyISAM;
+INSERT INTO t1 (order_id, product_id, product_type) VALUES
+('3d7ce39b5d4b3e3d22aaafe9b633de51',1206029, 3),
+('3d7ce39b5d4b3e3d22aaafe9b633de51',5880836, 3),
+('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
+INSERT INTO t2 (order_id, product_id, product_type) VALUES
+('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
+
+select t1.* from t1
+left join t2 using(order_id, product_id, product_type)
+where t2.order_id=NULL;
+select t1.* from t1
+left join t2 using(order_id, product_id, product_type)
+where t2.order_id is NULL;
+drop table t1,t2;
+
+#
+# The last select returned wrong results in 3.23.52
+#
+
+create table t1 (id int);
+insert into t1 values (null), (0);
+create table t2 (id int);
+insert into t2 values (null);
+select * from t1, t2 where t1.id = t2.id;
+alter table t1 add key id (id);
+select * from t1, t2 where t1.id = t2.id;
+drop table t1,t2;