Debian Codegraph @

mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test

raw
1 --source include/galera_cluster.inc
2 --source include/have_innodb.inc
3
4 #
5 # This test sets a SAVEPOINT at the very beginning
6 # of the transaction. When ROLLBACK TO SAVEPOINT is
7 # issued, mysql performs a full rollback on SEs that
8 # where not part of the transaction.
9 # Test that SR transactions are rolled back, and
10 # cleaned up properly in this case.
11 #
12
13 CREATE TABLE t1 (f1 INTEGER);
14 SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
15
16 START TRANSACTION;
17
18 SAVEPOINT a;
19 INSERT INTO t1 VALUES (1);
20 ROLLBACK TO SAVEPOINT a;
21
22 INSERT INTO t1 values (2);
23 COMMIT;
24
25 SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
26 --connection node_2
27 SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
28
29 DROP TABLE t1;