diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-01-19 23:44:43 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-01-19 23:44:43 +0400 |
commit | 8bedf1ea1c328fabea14a1ce232794d73814b6d7 (patch) | |
tree | 495db38600e15d1ee636ac4c9d841f79b6981bd0 /mysql-test/r/subselect_sj2.result | |
parent | 0e975ded65510a85173a6d05b9fd4824fbfd07af (diff) | |
download | mariadb-git-8bedf1ea1c328fabea14a1ce232794d73814b6d7.tar.gz |
BUG#912538: Wrong result (missing rows) with semijoin=on, firstmatch=on, ...
- setup_semijoin_dups_elimination() would incorrectly set join_tab->do_firstmatch
when the join order had outer tables interleaved with inner.
Diffstat (limited to 'mysql-test/r/subselect_sj2.result')
-rw-r--r-- | mysql-test/r/subselect_sj2.result | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result index 8df3bd8f9b8..4e9672446a3 100644 --- a/mysql-test/r/subselect_sj2.result +++ b/mysql-test/r/subselect_sj2.result @@ -889,5 +889,19 @@ a b b a c c NULL NULL DROP VIEW v1; DROP TABLE t1,t2,t3,t4; +# +# BUG#912538: Wrong result (missing rows) with semijoin=on, firstmatch=on, ... +# +CREATE TABLE t1 ( a INT NOT NULL, UNIQUE KEY(a) ); +INSERT INTO t1 VALUES (1),(2),(3),(4); +CREATE TABLE t2 ( b INT, c INT ) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1,1); +SELECT * FROM t1, t2 WHERE c IN (SELECT c FROM t1, t2 WHERE a = b); +a b c +1 1 1 +2 1 1 +3 1 1 +4 1 1 +DROP TABLE t1,t2; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; |