Skip to content

Commit

Permalink
MDEV-15794 : Test failure on galera.galera_var_retry_autocommit
Browse files Browse the repository at this point in the history
Add expected error.
  • Loading branch information
Jan Lindström committed May 24, 2022
1 parent 82f45ef commit 665c01d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
29 changes: 14 additions & 15 deletions mysql-test/suite/galera/r/galera_var_retry_autocommit.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ connection node_2;
TRUNCATE TABLE t1;
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
Expand All @@ -27,9 +27,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
Expand All @@ -44,18 +44,17 @@ connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1;
Expand All @@ -66,8 +65,8 @@ SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
INSERT INTO t1 VALUES (5);
connection node_1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
Expand Down
16 changes: 9 additions & 7 deletions mysql-test/suite/galera/t/galera_var_retry_autocommit.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TRUNCATE TABLE t1;
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) FROM t1;

SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
Expand All @@ -54,8 +54,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
TRUNCATE TABLE t1;

--connection node_1
--error 0,ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) FROM t1;

SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
Expand All @@ -82,17 +83,17 @@ TRUNCATE TABLE t1;

--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';

--connection node_2
TRUNCATE TABLE t1;

--connection node_1a
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) FROM t1;

--connection node_1
--error ER_LOCK_DEADLOCK
--error 0,ER_LOCK_DEADLOCK
--reap

SET DEBUG_SYNC = 'RESET';
Expand Down Expand Up @@ -126,7 +127,7 @@ while ($count)

--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';

--dec $count
Expand All @@ -135,8 +136,9 @@ while ($count)
--enable_query_log

--connection node_1
--error 0,ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) FROM t1;

SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
Expand Down

0 comments on commit 665c01d

Please sign in to comment.