set session transaction isolation level repeatable read;
SET DEFAULT_STORAGE_ENGINE = 'tokudb';
# Establish connection conn1 (user = root)
DROP TABLE IF EXISTS foo;
set session transaction isolation level repeatable read;
create table foo (a int, b int, primary key (a))engine=TokuDB;
show create table foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL,
  `b` int(11) DEFAULT NULL,
  PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
insert into foo values (1,1);
begin;
select * from foo;
a	b
1	1
begin;
select * from foo;
a	b
1	1
replace into foo values (1,100), (2,200);
#transaction that did the insert about to read
select * from foo;
a	b
1	100
2	200
#this should read just (1,1)
select * from foo;
a	b
1	1
commit;
# this should read 2 values, (1,100) and (2,200)
select * from foo;
a	b
1	100
2	200
#this should read just (1,1)
select * from foo;
a	b
1	1
commit;
set session transaction isolation level serializable;
DROP TABLE foo;
