diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-09-14 08:21:53 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-09-14 18:17:07 +0300 |
commit | 7730b7bace215154ab5f8234a3e7a5a343ee3ff3 (patch) | |
tree | 7fbd9aafc62e0d39c376d35e361e209b1f5ea765 | |
parent | af834c218a59b0f187edb19aa4f8bd476b9ed6ac (diff) | |
download | mariadb-git-7730b7bace215154ab5f8234a3e7a5a343ee3ff3.tar.gz |
MDEV-23617 : galera_sr.galera_sr_rollback_retry MTR failed: 1213: Deadlock found when trying to get lock
Add corrected wait_condition to wait until rows are in streaming
replication log.
-rw-r--r-- | mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test | 10 |
2 files changed, 14 insertions, 11 deletions
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result index 054f7cf2eae..1117a50ded1 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result @@ -11,10 +11,11 @@ INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); connection node_2; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; connection node_1; ROLLBACK; connection node_2; +SELECT * FROM t1; +f1 SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES (1); @@ -23,11 +24,11 @@ INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); COMMIT; -SELECT COUNT(*) = 5 FROM t1; -COUNT(*) = 5 -1 +SELECT COUNT(*) AS EXPECT_5 FROM t1; +EXPECT_5 +5 connection node_1; -SELECT COUNT(*) = 5 FROM t1; -COUNT(*) = 5 -1 +SELECT COUNT(*) AS EXPECT_5 FROM t1; +EXPECT_5 +5 DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test index c6c443a0828..e5d204d85c8 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test @@ -19,8 +19,7 @@ INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); --connection node_2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ---let $wait_condition = SELECT COUNT(*) > 0 FROM t1; +--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log --source include/wait_condition.inc --connection node_1 @@ -33,6 +32,7 @@ ROLLBACK; --connection node_2 --let $wait_condition = SELECT COUNT(*) = 0 FROM t1; --source include/wait_condition.inc +SELECT * FROM t1; # # It should be possible to reissue the same transaction against node #2 @@ -47,9 +47,11 @@ INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (5); COMMIT; -SELECT COUNT(*) = 5 FROM t1; +SELECT COUNT(*) AS EXPECT_5 FROM t1; --connection node_1 -SELECT COUNT(*) = 5 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 5 FROM t1; +--source include/wait_condition.inc +SELECT COUNT(*) AS EXPECT_5 FROM t1; DROP TABLE t1; |