From fc8359f0ac7764aa70b2e415da604e2ff0581628 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 22 May 2020 19:10:56 +0300 Subject: [PATCH] Fixed failure in flush_read_lock.test The failure was: mysqltest: At line 1737: query 'reap' failed: 1397: XAER_NOTA: Unknown XID The bug was in the test case int that it executed REAP XA COMMIT before the connection had truly disconnected --- mysql-test/main/flush_read_lock.result | 2 ++ mysql-test/main/flush_read_lock.test | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mysql-test/main/flush_read_lock.result b/mysql-test/main/flush_read_lock.result index be710050139c3..f7fca14506e16 100644 --- a/mysql-test/main/flush_read_lock.result +++ b/mysql-test/main/flush_read_lock.result @@ -1391,9 +1391,11 @@ insert into t3_trans values (2); xa end 'test2'; xa prepare 'test2'; # Disconnect temporary connection +set debug_sync='thread_end SIGNAL detached'; disconnect con_tmp; # Switching to connection 'con1'. connection con1; +set debug_sync='now WAIT_FOR detached'; flush tables with read lock; # Switching to connection 'default'. connection default; diff --git a/mysql-test/main/flush_read_lock.test b/mysql-test/main/flush_read_lock.test index 4283358770cfd..9d60aba58bac9 100644 --- a/mysql-test/main/flush_read_lock.test +++ b/mysql-test/main/flush_read_lock.test @@ -1698,9 +1698,11 @@ insert into t3_trans values (2); xa end 'test2'; xa prepare 'test2'; --echo # Disconnect temporary connection +set debug_sync='thread_end SIGNAL detached'; disconnect con_tmp; --echo # Switching to connection '$con_aux1'. connection $con_aux1; +set debug_sync='now WAIT_FOR detached'; flush tables with read lock; --echo # Switching to connection 'default'. connection default;