diff options
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 9e38a65d412..10f0c23f54d 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -14,8 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Sasha Pachev <sasha@mysql.com> is currently in charge of this file - #include "mysql_priv.h" #ifdef HAVE_REPLICATION @@ -311,7 +309,7 @@ int purge_master_logs(THD* thd, const char* to_log) char search_file_name[FN_REFLEN]; if (!mysql_bin_log.is_open()) { - send_ok(current_thd); + send_ok(thd); return 0; } @@ -324,8 +322,13 @@ int purge_master_logs(THD* thd, const char* to_log) int purge_master_logs_before_date(THD* thd, time_t purge_time) { - int res = mysql_bin_log.purge_logs_before_date(purge_time); - return purge_error_message(thd ,res); + if (!mysql_bin_log.is_open()) + { + send_ok(thd); + return 0; + } + return purge_error_message(thd, + mysql_bin_log.purge_logs_before_date(purge_time)); } int test_for_non_eof_log_read_errors(int error, const char **errmsg) |