diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-10-29 13:22:48 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-10-29 13:22:48 +0300 |
commit | 30b28babdc8d6db805741e519f3b33096aa8083d (patch) | |
tree | a1b2b062db670e4ac64ea955ff06ae86c69f2158 /mysql-test/t/join_outer.test | |
parent | b2d71434ed24d0901155fe68b0b7ee4fdad0e2d4 (diff) | |
parent | a8341dfd6e001faa0b3b0227650eea6721316f04 (diff) | |
download | mariadb-git-30b28babdc8d6db805741e519f3b33096aa8083d.tar.gz |
Merge 5.3->5.5
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r-- | mysql-test/t/join_outer.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 7a70c413e8d..19c5f64de78 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -1777,4 +1777,28 @@ SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON i2 = i3 ON i1 = i3 DROP TABLE t1,t2,t3; +--echo # +--echo # Bug mdev-6705: wrong on expression after constant row substitution +--echo # that triggers a simplification of WHERE condition +--echo # + +CREATE TABLE t1 (a int, b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10,8); + +CREATE TABLE t2 (c int) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8),(9); + +CREATE TABLE t3 (d int) ENGINE=MyISAM; +INSERT INTO t3 VALUES (3),(8); + +EXPLAIN EXTENDED +SELECT * FROM t1 INNER JOIN t2 ON c = b LEFT JOIN t3 ON d = a + WHERE b IN (1,2,3) OR b = d; + +SELECT * FROM t1 INNER JOIN t2 ON c = b LEFT JOIN t3 ON d = a + WHERE b IN (1,2,3) OR b = d; + +DROP TABLE t1,t2,t3; + + SET optimizer_switch=@save_optimizer_switch; |