Debian Codegraph @

mysql-test/suite/maria/rollback.test

raw
1 --source include/have_binlog_format_mixed_or_statement.inc
2 --source include/have_sequence.inc
3 # no-protocol doesn't print warnings about repaired tables
4 --source include/no_protocol.inc
5
6 reset master; # clear binlogs
7
8 call mtr.add_suppression("Table was marked as crashed");
9 call mtr.add_suppression("Checking table: .*");
10
11 #
12 # Testing rollback after crash
13 #
14
15 create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1;
16 create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0;
17 create sequence s1 cache=2 engine=aria;
18
19 insert into t1 (b) values (1),(2),(3),(4);
20 insert into t2 (b) values (1),(2),(3),(4);
21 select NEXT VALUE for s1,seq from seq_1_to_4;
22
23 begin;
24 insert into t1 (b) values (5),(6);
25 insert into t1 (b) values (7),(8);
26 insert into t2 (b) values (5),(6);
27 insert into t2 (b) values (7),(8);
28 commit;
29 begin;
30 insert into t1 (b) values (10),(11),(12);
31 update t1 set b=100 where a=2;
32 delete from t1 where a between 3 and 4;
33
34 insert into t2 (b) values (10),(11),(12);
35 update t2 set b=100 where a=2;
36 delete from t2 where a between 3 and 4;
37 select NEXT VALUE for s1,seq from seq_1_to_4;
38
39 --source include/kill_and_restart_mysqld.inc
40
41 select * from t1 order by a;
42 select * from t2 order by a;
43 insert into t1 (b) values (100),(200);
44 insert into t2 (b) values (100),(200);
45 select * from t1 order by a;
46 select * from t2 order by a;
47 select NEXT VALUE for s1,seq from seq_1_to_4;
48 drop table t1,t2;
49 drop sequence s1;
50
51 source include/show_binlog_events.inc;
52 --let $binlog_file=master-bin.000002
53 source include/show_binlog_events.inc;