[MDEV-3817] Wrong result with index_merge+index_merge_intersection, InnoDB table, join, AND and OR conditions Created: 2012-10-24 Updated: 2014-02-07 Resolved: 2014-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
The following test case
produces a wrong result. It returns the right 2 rows, but values in the 2nd row are strange:
There are no c='' and d=0 in the dataset, they should be 'two' and 12 instead. bzr version-info
Not reproducible on MariaDB 5.2 revno 3163, 5.3 revno 3587, 5.5 revno 3562, MySQL 5.6 revno 4229. Minimal optimizer_switch: index_merge=on,index_merge_intersection=on
EXPLAIN (with the minimal optimizer_switch):
|
| Comments |
| Comment by Sergei Petrunia [ 2012-10-30 ] | |||||||||||||||||||||||||||||||
|
There are four fixes made in init_ror_merged_scans(): [psergey-1] psergey@askmonty.org-20120601232556-2jojg7cuat4qxhcu
[psergey-2] psergey@askmonty.org-20120704103445-ro4sk3cwbbzn3t4p
[guilhem-1] guilhem.bichot@oracle.com-20110805143029-ywrzuz15uzgontr0
[guilhem-2] guilhem.bichot@oracle.com-20111209150650-tzx3ldzxe1yfwji6
| |||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-30 ] | |||||||||||||||||||||||||||||||
|
the line | |||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-30 ] | |||||||||||||||||||||||||||||||
|
Details about the bug fixed by [psergey-1]:
| |||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2012-10-30 ] | |||||||||||||||||||||||||||||||
|
in mysql-server-trunk, the DELETE from [psergey-1] will also use ROR-interesct.
annamalai.gurusami@oracle.com-20120510044831-d4xkpk2ky5sioeeq | |||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-02-06 ] | |||||||||||||||||||||||||||||||
|
It seems to be no longer repeatable in current 10.0.8: mysql> SELECT * FROM t1, t2 WHERE g = b AND ( a < 7 OR a > e );
--
-- | |||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-07 ] | |||||||||||||||||||||||||||||||
|
This bug was actually fixed, apparently it was left open by mistake:
| |||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-07 ] | |||||||||||||||||||||||||||||||
|
Fixed in 10.0.0 |