Details
-
Type:
Technical task
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=LevelDB; INSERT INTO t1 VALUES (1,10), (2,20); SELECT i FROM t1 WHERE i NOT IN (8) ORDER BY i DESC; i 20 20 10 10 EXPLAIN EXTENDED SELECT i FROM t1 WHERE i NOT IN (8) ORDER BY i DESC; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 range i i 5 NULL 20 100.00 Using where; Using index Warnings: Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` where (`test`.`t1`.`i` <> 8) order by `test`.`t1`.`i` desc
Please note that the result is non-deterministic, here is the variation that I'm getting on the exact same test (now it's 3 rows, not 4):
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=LevelDB; INSERT INTO t1 VALUES (1,10), (2,20); SELECT i FROM t1 WHERE i NOT IN (8) ORDER BY i DESC; i 20 10 10 EXPLAIN EXTENDED SELECT i FROM t1 WHERE i NOT IN (8) ORDER BY i DESC; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 range i i 5 NULL 20 100.00 Using where; Using index Warnings: Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` where (`test`.`t1`.`i` <> 8) order by `test`.`t1`.`i` desc
Test case:
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, KEY(i)) ENGINE=LevelDB; INSERT INTO t1 VALUES (1,10), (2,20); SELECT i FROM t1 WHERE i NOT IN (8) ORDER BY i DESC;
revision-id: psergey@askmonty.org-20130125135708-w6flw90gj2voizou revno: 4516 branch-nick: mysql-5.6-leveldb
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions