[MDEV-3205] LP:1000269 - Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0 Created: 2012-05-16 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: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query on the test data produces 6 rows when executed with semijoin+materialization, and 3 rows otherwise. 3 rows is the correct result. bzr version-info Also reproducible on maria/5.5 revno 3403. Minimal optimizer_switch: materialization=on,semijoin=on EXPLAIN (with minimal optimizer_switch and join_cache_level=2 which is current default): id select_type table type possible_keys key key_len ref rows filtered Extra
SET optimizer_switch = 'materialization=on,semijoin=on'; CREATE TABLE A (a1 VARCHAR(1), a2 VARCHAR(1)) CREATE TABLE B (b1 VARCHAR(1), b2 VARCHAR(1), KEY(b1)) CREATE TABLE C (c1 VARCHAR(1)) ENGINE=MyISAM; SELECT * FROM A, B
|
| Comments |
| Comment by Sergei Petrunia [ 2012-05-16 ] |
|
Re: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0 SELECT * FROM A, B WHERE b1 IN ( SELECT b2 FROM B WHERE b1 > 'o' ) AND ( b1 < 'l' OR a1 IN ('b','c') ); and the bug is still visible. |
| Comment by Elena Stepanova [ 2012-06-24 ] |
|
Re: Wrong result (extra rows) with semijoin+materialization, IN subqueries, join_cache_level>0 |
| Comment by Rasmus Johansson (Inactive) [ 2012-06-24 ] |
|
Launchpad bug id: 1000269 |