diff options
author | Andrei Elkin <aelkin@mysql.com> | 2009-04-30 15:28:07 +0300 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2009-04-30 15:28:07 +0300 |
commit | 2d20930eee4d67e833195859192037fcb27491b0 (patch) | |
tree | 740e351b86abdf6f9a459b68fc2afc4b5a28e1a5 /sql/sql_repl.cc | |
parent | 7f4e25644e5280b30f30a8253557fd8aff2ee7fa (diff) | |
download | mariadb-git-2d20930eee4d67e833195859192037fcb27491b0.tar.gz |
Bug #44179 reset slave crashes in my_error when reset_logs returns non-zero
my_error() was invoked in reset_slave()'s with purge_relay_logs()-failing branch
without passing sql_errno to it.
Fixed with setting sql_errno= ER_RELAY_LOG_FAIL in the purge_relay_logs()-failing branch.
sql/sql_repl.cc:
set sql_errno= ER_RELAY_LOG_FAIL when purge_relay_logs() fails.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 6285a2dfb55..06c6c022780 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1026,7 +1026,10 @@ int reset_slave(THD *thd, Master_info* mi) if ((error= purge_relay_logs(&mi->rli, thd, 1 /* just reset */, &errmsg))) + { + sql_errno= ER_RELAY_LOG_FAIL; goto err; + } /* Clear master's log coordinates and reset host/user/etc to the values |