mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-18096 The server would crash when has configs rpl_semi_sync_master_enabled = OFF rpl_semi_sync_master_wait_no_slave = OFF
The patch fixes a fired assert in the semisync master module. The assert caught attempt to switch semisync off (per rpl_semi_sync_master_wait_no_slave = OFF) when it was not even initialized (per rpl_semi_sync_master_enabled = OFF). The switching-off execution branch is relocated under one that executes enable_master() first. A minor cleaup is done to remove the int return from two functions that did not return anything but an error which could not happen in the functions.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 SET a=1;
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
@@ -0,0 +1 @@
|
||||
--rpl_semi_sync_master_enabled=0 --rpl_semi_sync_master_wait_no_slave=0
|
14
mysql-test/suite/rpl/t/rpl_semi_sync_wait_no_slave.test
Normal file
14
mysql-test/suite/rpl/t/rpl_semi_sync_wait_no_slave.test
Normal file
@@ -0,0 +1,14 @@
|
||||
# The test verifies master crash of MDEV-18096 when the server starts with
|
||||
# rpl_semi_sync_master_enabled = OFF rpl_semi_sync_master_wait_no_slave = OFF
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
--connection master
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 SET a=1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--source include/rpl_end.inc
|
Reference in New Issue
Block a user