summaryrefslogtreecommitdiff
path: root/mysql-test/t/join.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-09-21 10:14:42 +0200
committerSergei Golubchik <sergii@pisem.net>2013-09-21 10:14:42 +0200
commit9af177042ed0e297b8f26f2c2f8ae00b3a814a90 (patch)
tree0d8d2fab7ebeb02f3c25c00ac1543754b625bde8 /mysql-test/t/join.test
parenta6add4ff43a905cee1bfd00b2ec2d276018866ce (diff)
parent2fe0836eed16ce5809c34064893681f12c77da9f (diff)
downloadmariadb-git-9af177042ed0e297b8f26f2c2f8ae00b3a814a90.tar.gz
10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
Diffstat (limited to 'mysql-test/t/join.test')
-rw-r--r--mysql-test/t/join.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 73b40715676..54b2a3c82ea 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -1141,6 +1141,22 @@ DROP TABLE t1,t2,t3,t4,t5;
--error ER_PARSE_ERROR
SELECT * FROM t5 JOIN (t1 JOIN t2 UNION SELECT * FROM t3 JOIN t4);
+--echo #
+--echo # MDEV-4959: join of const table with NULL fields
+--echo #
+
+CREATE TABLE t1 (i1 int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+CREATE TABLE t2 (i2 int, a int, b int) ENGINE=MyISAM;
+CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
+INSERT INTO t2 VALUES (NULL,1,2),(NULL,2,3);
+
+SELECT * FROM t1 JOIN v2 ON i1 = i2 WHERE a < b;
+EXPLAIN EXTENDED
+SELECT * FROM t1 JOIN v2 ON i1 = i2 WHERE a < b;
+
+DROP VIEW v2;
+DROP TABLE t1,t2;
SET optimizer_switch=@save_optimizer_switch;