[MDEV-3381] LP:671340 - Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5 Created: 2010-11-05 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: | Philip Stoev (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query SELECT table2.pk , table1.col_int_key returns less rows with mrr_sort_keys=OFF in maria-5.3-mwl128-dsmrr-cpk and different rows in maria-5.3-dsmrr-cpk . engine_condition_pushdown can be OFF, so it is not a duplicate of bug #670417 |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2010-11-05 ] | ||||||||
|
Re: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5 --source include/have_innodb.inc SET SESSION optimizer_switch='index_condition_pushdown=off'; --disable_warnings CREATE TABLE t1 ( SET optimizer_switch='mrr_sort_keys=on'; EXPLAIN SELECT table2.pk , table1.col_int_key CREATE TABLE p1 AS SELECT table2.pk , table1.col_int_key SET optimizer_switch='mrr_sort_keys=off'; EXPLAIN SELECT table2.pk , table1.col_int_key CREATE TABLE p2 AS SELECT table2.pk , table1.col_int_key --let $diff_table_1 = test.p1 | ||||||||
| Comment by Sergei Petrunia [ 2010-12-02 ] | ||||||||
|
Re: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5 | ||||||||
| Comment by Sergei Petrunia [ 2010-12-06 ] | ||||||||
|
Re: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5 MariaDB [f1]>SELECT count
---------
--------- MariaDB [f1]> set join_cache_level=6; MariaDB [f1]> set join_buffer_size=1500; MariaDB [f1]> SELECT count
---------
--------- The problem can't be repeated with bigger join_buffer_size. The problem can be repeated with smaller join_buffer_size | ||||||||
| Comment by Sergei Petrunia [ 2010-12-08 ] | ||||||||
|
Re: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5
When the above is satisfied, we can have the following scenario:
=> Mrr_ordered_rndpos_reader gets a range_id with rowid that does not match the range_id. | ||||||||
| Comment by Sergei Petrunia [ 2010-12-08 ] | ||||||||
|
Re: Diverging results in with mrr_sort_keys=ON|OFF and join_cache_level=5 | ||||||||
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] | ||||||||
|
Launchpad bug id: 671340 |