Commit 2c9990dd authored by unknown's avatar unknown

A fix (bug #5546: mysqld crash on PURGE MASTER LOGS BEFORE '...' with log-bin off).

parent 2ae67068
...@@ -306,8 +306,13 @@ int purge_master_logs(THD* thd, const char* to_log) ...@@ -306,8 +306,13 @@ int purge_master_logs(THD* thd, const char* to_log)
int purge_master_logs_before_date(THD* thd, time_t purge_time) int purge_master_logs_before_date(THD* thd, time_t purge_time)
{ {
int res = mysql_bin_log.purge_logs_before_date(purge_time); if (!mysql_bin_log.is_open())
return purge_error_message(thd ,res); {
send_ok(current_thd);
return 0;
}
return purge_error_message(thd,
mysql_bin_log.purge_logs_before_date(purge_time));
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment