index only scans do not work for partitioned MyRocks tables and extended keys
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Fix Released
|
Medium
|
George Ormond Lorch III | |||
5.7 |
Fix Released
|
Medium
|
George Ormond Lorch III |
Bug Description
MYR-7 did not import the full set of sql/table.cc changes required for MyRocks.
There are two commits that need imported for MyRocks to behave correctly:
https:/
https:/
Without these full changes there are mtr failures due to different query plans.
One example, without the full patches in place:
mysql> create table t1 ( pk int primary key, col1 int, col2 int, key (col1) ) engine=rocksdb partition by hash(pk) partitions 2;
Query OK, 0 rows affected, 1 warning (0.08 sec)
mysql> insert into t1 values (1,10,10);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into t1 values (2,10,10);
Query OK, 1 row affected (0.00 sec)
mysql> insert into t1 values (11,20,20);
Query OK, 1 row affected (0.00 sec)
mysql> insert into t1 values (12,20,20);
Query OK, 1 row affected (0.00 sec)
mysql> explain select pk from t1 force index(col1) where col1=10\G;
*******
id: 1
select_type: SIMPLE
table: t1
partitions: p0,p1
type: ref
possible_keys: col1
key: col1
key_len: 5
ref: const
rows: 2
filtered: 100.00
Extra: NULL
1 row in set, 1 warning (0.00 sec)
And now with the patches:
mysql> create table t1 ( pk int primary key, col1 int, col2 int, key (col1) ) engine=rocksdb partition by hash(pk) partitions 2;
Query OK, 0 rows affected, 1 warning (0.08 sec)
mysql> insert into t1 values (1,10,10);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into t1 values (2,10,10);
Query OK, 1 row affected (0.00 sec)
mysql> insert into t1 values (11,20,20);
Query OK, 1 row affected (0.00 sec)
mysql> insert into t1 values (12,20,20);
Query OK, 1 row affected (0.00 sec)
mysql> explain select pk from t1 force index(col1) where col1=10\G;
*******
id: 1
select_type: SIMPLE
table: t1
partitions: p0,p1
type: ref
possible_keys: col1
key: col1
key_len: 5
ref: const
rows: 2
filtered: 100.00
Extra: Using index
1 row in set, 1 warning (0.00 sec)
tags: | added: myrocks |
https:/ /jira.percona. com/browse/ MYR-98 /github. com/percona/ percona- server/ pull/1480 jenkins. percona. com/view/ PS%205. 6/job/percona- server- 5.6-param/ 1755/
https:/
http://