1# test simple MVCC, that a transaction does not read something committed after it
2
3--source include/have_tokudb.inc
4SET DEFAULT_STORAGE_ENGINE = 'tokudb';
5set session transaction isolation level repeatable read;
6set session tokudb_disable_slow_alter=ON;
7
8--echo # Establish connection conn1 (user = root)
9connect (conn1,localhost,root,,);
10
11--disable_warnings
12DROP TABLE IF EXISTS foo,bar;
13--enable_warnings
14
15connection conn1;
16set session transaction isolation level repeatable read;
17create table foo (a int, b int) engine=TokuDB;
18create table bar (a int) engine=TokuDB;
19insert into foo values (1,10),(2,20),(3,30);
20
21begin;
22select * from bar;
23
24connection default;
25delete from foo;
26select * from foo;
27alter table foo add column c int first;
28alter table foo drop column b;
29
30connection conn1;
31commit;
32
33connection default;
34disconnect conn1;
35
36connection default;
37# Final cleanup.
38set session transaction isolation level serializable;
39DROP TABLE foo,bar;