LevelDB storage engine (MDEV-3841)

[MDEV-4062] LevelDB works incorrectly with query cache Created: 2013-01-16  Updated: 2013-01-17  Resolved: 2013-01-17

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

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

Issue Links:
Relates

 Description   

Possibly LevelDB is not supposed to work with query cache, but then it should be taken care of, since now it returns incorrect results;

Please note that the test case below needs to be run with query-cache-type=1 (I couldn't find a suitable include file to set it automatically).

The same test without query cache returns 'updated' in all selects after update, as expected. Same is true for the test case with query cache if it's run for InnoDB.

Test output:

create table t1 (pk int primary key, c char(8)) engine=LevelDB;
insert into t1 values (1,'new'),(2,'new');
select * from t1;
pk      c
1       new
2       new
 
connect  con1,localhost,root,,;
 
update t1 set c = 'updated';
 
connection default;
 
flush status;
show status like 'Qcache_hits';
Variable_name   Value
Qcache_hits     0
show global status like 'Qcache_hits';
Variable_name   Value
Qcache_hits     0
select * from t1;
pk      c
1       new
2       new
select sql_no_cache * from t1;
pk      c
1       new
2       new
select * from t1 where pk = 1;
pk      c
1       new
show status like 'Qcache_hits';
Variable_name   Value
Qcache_hits     0
show global status like 'Qcache_hits';
Variable_name   Value
Qcache_hits     0
 

Test case:

# Important:
# The test needs to be run with --mysqld=--query-cache-type=1
 
--enable_connect_log
 
create table t1 (pk int primary key, c char(8)) engine=LevelDB;
insert into t1 values (1,'new'),(2,'new');
 
select * from t1;
 
--connect (con1,localhost,root,,)
 
update t1 set c = 'updated';
#select * from t1;
 
--connection default
flush status;
show status like 'Qcache_hits';
show global status like 'Qcache_hits';
select * from t1;
select sql_no_cache * from t1;
select * from t1 where pk = 1;
show status like 'Qcache_hits';
show global status like 'Qcache_hits';

revision-id: psergey@askmonty.org-20130115181447-1jfr200qcuqzp1sr
revno: 4495
branch-nick: mysql-5.6-leveldb



 Comments   
Comment by Sergei Petrunia [ 2013-01-17 ]

For now, I've just disabled query cache for LevelDB tables. In the future, we can add support for it

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