From bb9e547a860432972739e6661d15c52d8c008748 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Wed, 24 May 2017 16:12:57 +0530 Subject: [PATCH] Bug#18950197 RPL_SEMI_SYNC_UNINSTALL_PLUGIN FAILS BECAUSE RPL_SEMI_SYNC_MASTER_CLIENTS=1 Analysis: Uninstalling rpl_semi_sync_slave on slave will trigger removing the slave logic on Master which will reduce Rpl_semi_sync_master_clients by one number. But it happens asynchronously on Master. Having assert to check this value with zero will have problems on slow pb2 machines. Fix: Change assert into wait_for_status_var condition. --- .../suite/rpl/r/rpl_semi_sync_uninstall_plugin.result | 1 - .../suite/rpl/t/rpl_semi_sync_uninstall_plugin.test | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result b/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result index bd659e71600..347e6de4dd7 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result @@ -28,7 +28,6 @@ include/stop_slave.inc SET GLOBAL rpl_semi_sync_slave_enabled = OFF; include/start_slave.inc UNINSTALL PLUGIN rpl_semi_sync_slave; -include/assert.inc [semi sync master clients should be 0.] UNINSTALL PLUGIN rpl_semi_sync_master; CREATE TABLE t1(i int); INSERT INTO t1 values (3); diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test b/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test index 2badd4203cf..a3a3da8b18a 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test @@ -125,12 +125,11 @@ SET GLOBAL rpl_semi_sync_slave_enabled = OFF; # Step 4.4: Uninstall semi sync plugin, it should be successful now. UNINSTALL PLUGIN rpl_semi_sync_slave; -# Step 4.5: On Master, check that semi sync slaves are now '0'. +# Step 4.5: On Master, wait until semi sync slaves is '0'. --connection master ---let $master_clients=[show status like "Rpl_semi_sync_master_clients", Value, 1] ---let assert_cond= $master_clients = 0 ---let assert_text= semi sync master clients should be 0. ---source include/assert.inc +--let $status_var= Rpl_semi_sync_master_clients +--let $status_var_value= 0 +--source include/wait_for_status_var.inc # Step 4.6: So uninstalling semi sync plugin should be allowed UNINSTALL PLUGIN rpl_semi_sync_master;