diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/maria/rollback.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/maria/rollback.test')
-rw-r--r-- | mysql-test/suite/maria/rollback.test | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/rollback.test b/mysql-test/suite/maria/rollback.test new file mode 100644 index 00000000..d42be927 --- /dev/null +++ b/mysql-test/suite/maria/rollback.test @@ -0,0 +1,53 @@ +--source include/have_binlog_format_mixed_or_statement.inc +--source include/have_sequence.inc +# no-protocol doesn't print warnings about repaired tables +--source include/no_protocol.inc + +reset master; # clear binlogs + +call mtr.add_suppression("Table was marked as crashed"); +call mtr.add_suppression("Checking table: .*"); + +# +# Testing rollback after crash +# + +create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1; +create table t2 (a int primary key auto_increment, b int) engine=aria transactional= 0; +create sequence s1 cache=2 engine=aria; + +insert into t1 (b) values (1),(2),(3),(4); +insert into t2 (b) values (1),(2),(3),(4); +select NEXT VALUE for s1,seq from seq_1_to_4; + +begin; +insert into t1 (b) values (5),(6); +insert into t1 (b) values (7),(8); +insert into t2 (b) values (5),(6); +insert into t2 (b) values (7),(8); +commit; +begin; +insert into t1 (b) values (10),(11),(12); +update t1 set b=100 where a=2; +delete from t1 where a between 3 and 4; + +insert into t2 (b) values (10),(11),(12); +update t2 set b=100 where a=2; +delete from t2 where a between 3 and 4; +select NEXT VALUE for s1,seq from seq_1_to_4; + +--source include/kill_and_restart_mysqld.inc + +select * from t1 order by a; +select * from t2 order by a; +insert into t1 (b) values (100),(200); +insert into t2 (b) values (100),(200); +select * from t1 order by a; +select * from t2 order by a; +select NEXT VALUE for s1,seq from seq_1_to_4; +drop table t1,t2; +drop sequence s1; + +source include/show_binlog_events.inc; +--let $binlog_file=master-bin.000002 +source include/show_binlog_events.inc; |