1
# verify a db_get does not read a read committed transaction's data because it is in live list
3
#--source include/have_tokudb.inc
4
SET DEFAULT_STORAGE_ENGINE = 'tokudb';
6
--echo # Establish connection conn1 (user = root)
7
connect (conn1,localhost,root,,);
10
DROP TABLE IF EXISTS foo;
14
set session transaction isolation level read committed;
15
create table foo (a int, b int, c int, primary key (a), key (b))engine=TokuDB;
16
show create table foo;
17
insert into foo values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900);
20
--echo # should use key b
21
explain select * from foo where b=50;
22
--echo # should get (5,50,500)
23
select * from foo where b=50;
24
replace into foo values (5,50,1515);
27
set session transaction isolation level read committed;
29
--echo # should use key b
30
explain select * from foo where b=50;
31
--echo # should get (5,50,500)
32
select * from foo where b=50;
36
--echo # should use key b
37
explain select * from foo where b=50;
38
--echo # should get (5,50,1515)
39
select * from foo where b=50;
42
--echo # should use key b
43
explain select * from foo where b=50;
44
--echo # should get (5,50,1515)
45
select * from foo where b=50;
47
--echo # should use key b
48
explain select * from foo where b=50;
49
--echo # should get (5,50,1515)
50
select * from foo where b=50;
57
set session transaction isolation level serializable;