LevelDB storage engine (MDEV-3841)

[MDEV-4086] LevelDB does not allow a query with multi-part pk and index and ORDER BY .. DEC Created: 2013-01-25  Updated: 2013-01-25  Resolved: 2013-01-25

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Technical task Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: leveldb

Issue Links:
Relates

 Description   
Error formatting macro: code: java.lang.StackOverflowError

mysql> select * from t1 where a = 1 and c = 1 and d = 1 order by e desc;
ERROR 1031 (HY000): Table storage engine for 't1' doesn't have this option
mysql> explain extended select * from t1 where a = 1 and c = 1 and d = 1 order by e desc;
----------------------------------------------------------------------------------------

id select_type table type possible_keys key key_len ref rows filtered Extra

----------------------------------------------------------------------------------------

1 SIMPLE t1 ref PRIMARY,a a 13 const,const,const 10 100.00 Using where

----------------------------------------------------------------------------------------
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Level Code Message

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note 1003 /* select#1 */ select `db1`.`t1`.`a` AS `a`,`db1`.`t1`.`b` AS `b`,`db1`.`t1`.`c` AS `c`,`db1`.`t1`.`d` AS `d`,`db1`.`t1`.`e` AS `e` from `db1`.`t1` where ((`db1`.`t1`.`d` = 1) and (`db1`.`t1`.`c` = 1) and (`db1`.`t1`.`a` = 1)) order by `db1`.`t1`.`e` desc

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 row in set (0.01 sec)

mysql> show create table t1;
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Table Create Table

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL DEFAULT '0',
`b` int(11) NOT NULL DEFAULT '0',
`c` int(11) NOT NULL DEFAULT '0',
`d` int(11) DEFAULT NULL,
`e` int(11) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`),
KEY `a` (`a`,`c`,`d`,`e`)
) ENGINE=LEVELDB DEFAULT CHARSET=latin1

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Test case:

create table t1 (a int, b int, c int, d int, e int, primary key (a,b,c), key (a,c,d,e)) engine=LevelDB;
insert into t1 values (1,1,1,1,1),(2,2,2,2,2);
select * from t1 where a = 1 and c = 1 and d = 1 order by e desc;

revision-id: psergey@askmonty.org-20130124165745-nm4yaxrsu8e4o2ll
revno: 4511
branch-nick: mysql-5.6-leveldb


Generated at Thu Feb 08 06:53:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.