From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- .../suite/galera_sr/t/mysql-wsrep-features#96.test | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test (limited to 'mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test') diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test new file mode 100644 index 00000000..c773b310 --- /dev/null +++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test @@ -0,0 +1,45 @@ +# mysql-wsrep-features#96 - "Sanity check failed" with SR and statement rolled back due to error + +--source include/galera_cluster.inc +--source include/have_innodb.inc + + +--connection node_1 + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); +CREATE TABLE t2 (f2 VARCHAR(32)); + +SET SESSION wsrep_trx_fragment_size=1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES (1); + +# This statement causes full transaction rollback +# rather than just statement rollback, as it is run under SR + +--error ER_LOCK_DEADLOCK +INSERT INTO t1 VALUES (2),(1); +INSERT INTO t2 VALUES ('abc'); + +--connection node_2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; + +SELECT COUNT(*) = 0 FROM t1; +SELECT COUNT(*) = 1 FROM t2; + +--connection node_1 +ROLLBACK; + +--connection node_2 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + +SELECT COUNT(*) = 0 FROM t1; +SELECT COUNT(*) = 0 FROM t2; + +--connection node_1 +DROP TABLE t1; +DROP TABLE t2; + + + + -- cgit v1.2.3