[MDEV-389] Wrong result (missing row) with semijoin, join_cache_level>4, LEFT JOIN, GROUP BY, ORDER BY, LIMIT Created: 2012-07-11 Updated: 2013-05-04 Resolved: 2013-05-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.25, 5.3.7 |
| Fix Version/s: | 5.5.31 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following query
on the test data returns 1 row if it's run with semijoin and join_cache_level > 4, and 2 rows otherwise. 2 rows is the correct result. bzr version-info
Also reproducible on maria/5.3 revno 3551, and on release builds 5.3.7 and 5.5.25. Minimal optimizer_switch:
Full optimizer_switch (default):
EXPLAIN (with the default optimizer_switch):
Test case:
Expected result:
Actual result:
Please note that the aggregate function is not required, it just makes the test somewhat more sensible. The query can be modified like this (double a in ORDER BY is not a typo, it is needed for this version of the query):
It still returns 1 row instead of 2. Note: I've set it to Minor, because join_cache_level > 4 is not default |
| Comments |
| Comment by Patryk Pomykalski [ 2013-02-26 ] |
|
Can't repeat with latest 5.5 (rev 3667) |
| Comment by Sergei Petrunia [ 2013-03-09 ] |
|
In 5.3, the bug is removed by this revision: revno: 3592 [merge] I am unable to tell which particular patch caused it to be fixed. |
| Comment by Sergei Petrunia [ 2013-03-09 ] |
|
In 5.3, the change is because of a different query plan: rev-3592: rev-3591: maybe, the bug is still there. |
| Comment by Sergei Petrunia [ 2013-05-04 ] |
|
Not repeatable in the latest 5.5 (revno: 3742). |
| Comment by Sergei Petrunia [ 2013-05-04 ] |
|
For now, added testcase. Feel free to re-open if the problem repeats again |