1
0
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:
Andrei Elkin
2019-04-17 15:32:30 +03:00
parent 323e6cd74c
commit 42c58b87da
5 changed files with 38 additions and 19 deletions

View File

@@ -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

View File

@@ -0,0 +1 @@
--rpl_semi_sync_master_enabled=0 --rpl_semi_sync_master_wait_no_slave=0

View 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