mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fix rpl.rpl_semi_sync_uninstall_plugin to work reliably
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
include/master-slave.inc
|
include/master-slave.inc
|
||||||
[connection master]
|
[connection master]
|
||||||
|
call mtr.add_suppression("Read semi-sync reply network error");
|
||||||
|
call mtr.add_suppression("Timeout waiting for reply of binlog");
|
||||||
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
||||||
[connection slave]
|
[connection slave]
|
||||||
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
||||||
@@ -46,14 +48,14 @@ rpl_semi_sync_master DELETED
|
|||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||||
plugin_name plugin_status
|
plugin_name plugin_status
|
||||||
|
[connection master]
|
||||||
|
create table t2 (a int);
|
||||||
|
drop table t2;
|
||||||
|
[connection slave]
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||||
plugin_name plugin_status
|
plugin_name plugin_status
|
||||||
[connection master]
|
[connection master]
|
||||||
show status like "Rpl_semi_sync_master_clients";
|
|
||||||
Variable_name Value
|
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
|
||||||
plugin_name plugin_status
|
|
||||||
CREATE TABLE t1(i int);
|
CREATE TABLE t1(i int);
|
||||||
INSERT INTO t1 values (3);
|
INSERT INTO t1 values (3);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@@ -16,6 +16,9 @@
|
|||||||
--source include/have_binlog_format_statement.inc
|
--source include/have_binlog_format_statement.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
call mtr.add_suppression("Read semi-sync reply network error");
|
||||||
|
call mtr.add_suppression("Timeout waiting for reply of binlog");
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Case 1: Uninstallation of semi sync plugins should be allowed when it is
|
# Case 1: Uninstallation of semi sync plugins should be allowed when it is
|
||||||
# not in use i.e., when asynchronous replication is active.
|
# not in use i.e., when asynchronous replication is active.
|
||||||
@@ -105,21 +108,26 @@ select plugin_name,plugin_status from information_schema.plugins where plugin_na
|
|||||||
# Step 4.2: Disable semi sync on slave.
|
# Step 4.2: Disable semi sync on slave.
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
--echo [connection master]
|
||||||
|
# Send something to the slave so that the master would notice that nobody's listening.
|
||||||
|
create table t2 (a int); drop table t2;
|
||||||
|
# and wait for plugin to be unloaded automatically
|
||||||
|
let $wait_condition=select count(*) = 0 from information_schema.plugins where plugin_name like 'rpl_%';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--connection slave
|
||||||
|
--echo [connection slave]
|
||||||
|
|
||||||
# Step 4.3: Start IO thread on slave.
|
# Step 4.3: Start IO thread on slave.
|
||||||
--source include/start_slave.inc
|
--source include/start_slave.inc
|
||||||
|
|
||||||
# Step 4.4: Uninstall semi sync plugin, it should be successful now.
|
# Step 4.4: Uninstall semi sync plugin, it should be successful now.
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||||
|
|
||||||
# Step 4.5: On Master, check that semi sync slaves are now '0'.
|
# Step 4.7: Check that replication is working fine at the end of the test case
|
||||||
--connection master
|
--connection master
|
||||||
--echo [connection master]
|
--echo [connection master]
|
||||||
show status like "Rpl_semi_sync_master_clients";
|
|
||||||
|
|
||||||
# Step 4.6: So uninstalling semi sync plugin should be allowed
|
|
||||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
|
||||||
|
|
||||||
# Step 4.7: Check that replication is working fine at the end of the test case
|
|
||||||
CREATE TABLE t1(i int);
|
CREATE TABLE t1(i int);
|
||||||
INSERT INTO t1 values (3);
|
INSERT INTO t1 values (3);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
Reference in New Issue
Block a user