[MDEV-3127] LP:707925 - Wrong result with join_cache_level=6 optimizer_use_mrr = force (incremental, BKA join) Created: 2011-01-26 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: | Philip Stoev (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT alias1.f2 FROM t1 AS alias1 JOIN ( t1 AS alias2 FORCE KEY (f3) JOIN t1 AS alias3 FORCE KEY (f2) ON alias3.f2 = alias2.f2 AND alias3.f4 = alias2.f3 ) ON alias3.f1 <= alias2.f1 returns less rows when executed with jkl 6 and MRR = force . Not repeatable with jkl 4 or jkl 7 . Not repeatable with a smaller number of rows. The FORCE KEYs were added after the fact in order to make the query plan more robust. Explain: id select_type table type possible_keys key key_len ref rows Extra Test case: --source include/have_innodb.inc SET SESSION optimizer_use_mrr = 'force'; --let $query = SELECT alias1.f2 FROM t1 AS alias1 JOIN ( t1 AS alias2 FORCE KEY (f3) JOIN t1 AS alias3 FORCE KEY (f2) ON alias3.f2 = alias2.f2 AND alias3.f4 = alias2.f3 ) ON alias3.f1 <= alias2.f1 --eval EXPLAIN $query SET SESSION join_cache_level = 0; --let $diff_table_1 = test.d1 |
| Comments |
| Comment by Igor Babaev [ 2011-01-28 ] |
|
Re: Wrong result with join_cache_level=6 optimizer_use_mrr = force (incremental, BKA join) From this I conclude that problem is with the new mrr code that optionally sorts keys + icp. |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 707925 |