[MDEV-2198] LP:912538 - Wrong result (missing rows) with semijoin=on, firstmatch=on, IN subquery, constant InnoDB table Created: 2012-01-05 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query SELECT * FROM t1, t2 on test data returns 1 row instead of expected 4 rows. bzr version-info Reproducible on 5.5, but there the scenario additionally requires join_cache_level=0, as otherwise it hits a plan with flat BNL. On 5.3 revno 3376 it is reproducible with the default join_cache_level=2. EXPLAIN with InnoDB table (wrong result): id select_type table type possible_keys key key_len ref rows filtered Extra EXPLAIN with MyISAM table (correct result): id select_type table type possible_keys key key_len ref rows filtered Extra Minimal optimizer_switch: semijoin=on,firstmatch=on (current defaults) Test case: CREATE TABLE t1 ( a INT NOT NULL, UNIQUE KEY(a) );
SELECT * FROM t1, t2 End of test case Expected result: Actual result: |
| Comments |
| Comment by Elena Stepanova [ 2012-01-05 ] |
|
Re: Wrong result (missing rows) with semijoin=on, firstmatch=on, IN subquery, constant InnoDB table |
| Comment by Sergei Petrunia [ 2012-01-19 ] |
|
Re: Wrong result (missing rows) with semijoin=on, firstmatch=on, IN subquery, constant InnoDB table |
| Comment by Rasmus Johansson (Inactive) [ 2012-02-20 ] |
|
Launchpad bug id: 912538 |