diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:39:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:39:13 +0000 |
commit | 86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch) | |
tree | 28c9e526ea739c6f9b89e36115e1e2698bddf981 /mysql-test/suite/galera/t/MDEV-31272.test | |
parent | Releasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff) | |
download | mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip |
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/galera/t/MDEV-31272.test')
-rw-r--r-- | mysql-test/suite/galera/t/MDEV-31272.test | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/MDEV-31272.test b/mysql-test/suite/galera/t/MDEV-31272.test new file mode 100644 index 00000000..d2c82378 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-31272.test @@ -0,0 +1,58 @@ +# +# MDEV-31272: Statement rollback causes empty writeset replication +# + +--source include/galera_cluster.inc + +# +# Case 1: Multi statement transaction +# +--connection node_1 +CREATE TABLE t1 (f1 int primary key, f2 int); +INSERT INTO t1 VALUES (1,0); + +--let $replicated_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (2,4),(1,1); +COMMIT; + +--let $replicated_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--disable_query_log +--eval SELECT $replicated_new - $replicated_old AS 'Writesets replicated (expect 0)'; +--enable_query_log + +--connection node_1 +SELECT * FROM t1; +--connection node_2 +SELECT * FROM t1; + +DROP TABLE t1; + + +# +# Case 2: autocommit statement +# +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER); +INSERT INTO t1 VALUES (1,0); + +--let $replicated_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (2,4), (1,1); + +--let $replicated_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--disable_query_log +--eval SELECT $replicated_new - $replicated_old AS 'Writesets replicated (expect 0)'; +--enable_query_log + +--connection node_1 +SELECT * FROM t1; +--connection node_2 +SELECT * FROM t1; + +DROP TABLE t1; |