summaryrefslogtreecommitdiff
path: root/mysql-test/t/null.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/null.test')
-rw-r--r--mysql-test/t/null.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index 4a45240ec68..81951a9ce68 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -283,3 +283,15 @@ SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
DROP TABLE t1;
+
+--echo #
+--echo # Bug mdev-5132: crash when exeicuting a join query
+--echo # with IS NULL and IS NOT NULL in where
+--echo #
+
+CREATE TABLE t1 (a DATE, b INT, c INT, KEY(a), KEY(b), KEY(c)) ENGINE=MyISAM;
+CREATE TABLE t2 (d DATE) ENGINE=MyISAM;
+
+SELECT * FROM t1,t2 WHERE 1 IS NOT NULL AND t1.b IS NULL;
+
+DROP TABLE t1,t2;