Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
Found this while working on MDEV-14433:
Found an interesting mismatch between query plans that depends on the index number:
Upstream, MySQL 5.6
CREATE TABLE t3(
|
pk int primary key,
|
a varchar(10) NOT NULL,
|
e int(11) DEFAULT 0,
|
KEY (a)
|
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8;
|
insert into t3 values (1,1,1),(2,2,2);
|
explain select a from t3 where a <'zzz';
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| 1 | SIMPLE | t3 | range | a | a | 32 | NULL | 2 | Using where |
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
CREATE TABLE t4(
|
pk int,
|
a varchar(10) NOT NULL,
|
e int(11) DEFAULT 0,
|
KEY (a)
|
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8;
|
insert into t4 values (1,1,1),(2,2,2);
|
explain select a from t4 where a <'zzz';
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| 1 | SIMPLE | t4 | range | a | a | 32 | NULL | 1 | Using where |
|
+----+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
MariaDB:
CREATE TABLE t3(
|
pk int primary key,
|
a varchar(10) NOT NULL,
|
e int(11) DEFAULT 0,
|
KEY (a)
|
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8;
|
insert into t3 values (1,1,1),(2,2,2);
|
explain select a from t3 where a <'zzz';
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| 1 | SIMPLE | t3 | range | a | a | 32 | NULL | 1 | Using where |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
CREATE TABLE t4(
|
pk int,
|
a varchar(10) NOT NULL,
|
e int(11) DEFAULT 0,
|
KEY (a)
|
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8;
|
insert into t4 values (1,1,1),(2,2,2);
|
explain select a from t4 where a <'zzz';
|
+------+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|
| 1 | SIMPLE | t4 | index | a | a | 32 | NULL | 0 | Using where; Using index |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|
Attachments
Issue Links
- includes
-
MDEV-14607 storage_engine-rocksdb.type_bit_indexes fails after latest pushes
- Closed
- is part of
-
MDEV-14433 RocksDB may show empty or incorrect output with rocksdb_strict_collation_check=off
- Closed