[MDEV-5160] Wrong result (missing row) with outer_join_with_cache=on, join_cache_level > 0, RIGHT JOIN, HAVING, LIMIT Created: 2013-10-19 Updated: 2013-11-15 Resolved: 2013-11-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4 |
| Fix Version/s: | 10.0.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
Result:
The 2nd result is the correct one. The failure happens on current 10.0-base (revno 3733) and 10.0 (revno 3856). I found the revision on 10.0-base when it started happening, it was a merge from 5.5:
But on some reason I could not reproduce it on 5.5, even after rolling back to the revision which was merged into 10.0-base. |
| Comments |
| Comment by Igor Babaev [ 2013-10-22 ] | ||||
|
The bug is reproducible with a regular join as well: MariaDB [test]> INSERT INTO t1 values ('a'), ('x');
-----
----- | ||||
| Comment by Igor Babaev [ 2013-10-22 ] | ||||
|
The bug happens because sort_table_cond is extracted incorrectly due to the fact that curr_join->tmp_having needs an update of used tables. === modified file 'sql/sql_select.cc' Item* sort_table_cond= make_cond_for_table(thd, curr_join->tmp_having, It looks like the bug can manifest itself only starting with10.0-base. | ||||
| Comment by Igor Babaev [ 2013-11-15 ] | ||||
|
The fix for this bug was pushed into 10.0-base |