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.
This commit is contained in:
Andrei Elkin 2009-04-30 15:28:07 +03:00
parent 7f4e25644e
commit 2d20930eee

View File

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