mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.0.14 into 10.1
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2014, Monty Program Ab
|
||||
Copyright (c) 2008, 2014, SkySQL Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -3074,6 +3074,7 @@ int reset_slave(THD *thd, Master_info* mi)
|
||||
mi->clear_error();
|
||||
mi->rli.clear_error();
|
||||
mi->rli.clear_until_condition();
|
||||
mi->rli.slave_skip_counter= 0;
|
||||
|
||||
// close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
|
||||
end_master_info(mi);
|
||||
@ -3224,6 +3225,9 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
|
||||
LEX_MASTER_INFO* lex_mi= &thd->lex->mi;
|
||||
DBUG_ENTER("change_master");
|
||||
|
||||
mysql_mutex_assert_owner(&LOCK_active_mi);
|
||||
DBUG_ASSERT(master_info_index);
|
||||
|
||||
*master_info_added= false;
|
||||
/*
|
||||
We need to check if there is an empty master_host. Otherwise
|
||||
@ -3521,6 +3525,7 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
|
||||
/* Clear the errors, for a clean start */
|
||||
mi->rli.clear_error();
|
||||
mi->rli.clear_until_condition();
|
||||
mi->rli.slave_skip_counter= 0;
|
||||
|
||||
sql_print_information("'CHANGE MASTER TO executed'. "
|
||||
"Previous state master_host='%s', master_port='%u', master_log_file='%s', "
|
||||
@ -3622,7 +3627,8 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
else /* showing relay log contents */
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_active_mi);
|
||||
if (!(mi= master_info_index->
|
||||
if (!master_info_index ||
|
||||
!(mi= master_info_index->
|
||||
get_master_info(&thd->variables.default_master_connection,
|
||||
Sql_condition::WARN_LEVEL_ERROR)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user