-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#29915479 RUNNING COM_REGISTER_SLAVE WITHOUT COM_BINLOG_DUMP CAN R…
…ESULTS IN SERVER EXIT in fact, in MariaDB it cannot, but it can show spurious slaves in SHOW SLAVE HOSTS. slave was registered in COM_REGISTER_SLAVE and un-registered after COM_BINLOG_DUMP. If there was no COM_BINLOG_DUMP, it would never unregister.
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include/master-slave.inc | ||
[connection master] | ||
set @old_dbug=@@global.debug_dbug; | ||
set global debug_dbug='d,fail_com_register_slave'; | ||
stop slave; | ||
reset slave; | ||
include/wait_for_slave_to_stop.inc | ||
start slave; | ||
stop slave; | ||
include/wait_for_slave_to_stop.inc | ||
set global debug_dbug=@old_dbug; | ||
kill DUMP_THREAD; | ||
show slave hosts; | ||
Server_id Host Port Master_id | ||
start slave; | ||
include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
source include/have_debug.inc; | ||
source include/have_binlog_format_mixed.inc; | ||
source include/master-slave.inc; | ||
|
||
connection slave; | ||
|
||
set @old_dbug=@@global.debug_dbug; | ||
set global debug_dbug='d,fail_com_register_slave'; | ||
|
||
stop slave; | ||
reset slave; | ||
source include/wait_for_slave_to_stop.inc; | ||
start slave; | ||
stop slave; | ||
source include/wait_for_slave_to_stop.inc; | ||
set global debug_dbug=@old_dbug; | ||
|
||
connection master; | ||
|
||
### why is that needed? | ||
let $id=`SELECT id from information_schema.processlist where command='Binlog Dump'`; | ||
if ($id) { | ||
replace_result $id DUMP_THREAD; | ||
eval kill $id; | ||
let $wait_condition= SELECT count(*)=0 from information_schema.processlist where command='Binlog Dump'; | ||
source include/wait_condition.inc; | ||
} | ||
|
||
show slave hosts; | ||
|
||
connection slave; | ||
start slave; | ||
source include/rpl_end.inc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters