diff options
author | Kristofer Pettersson <kpettersson@mysql.com> | 2008-07-21 11:18:35 +0200 |
---|---|---|
committer | Kristofer Pettersson <kpettersson@mysql.com> | 2008-07-21 11:18:35 +0200 |
commit | ace7798e7d3611423a86ade004dff83989163f0c (patch) | |
tree | 17cbd76088d7dbae7ea0db4abcd4dc2b6915bbd9 /sql/log.cc | |
parent | c137f3d450341dba2815a5a1cb4d7336349955e2 (diff) | |
parent | b7d4c76a54876f5e2aac4d30e171db2cff91dd04 (diff) | |
download | mariadb-git-ace7798e7d3611423a86ade004dff83989163f0c.tar.gz |
Manual merge
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/sql/log.cc b/sql/log.cc index fc58b90366a..0466fe3c948 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3070,6 +3070,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log, int ret = 0; bool exit_loop= 0; LOG_INFO log_info; + THD *thd =current_thd; DBUG_ENTER("purge_logs"); DBUG_PRINT("info",("to_log= %s",to_log)); @@ -3140,18 +3141,30 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log, } else { - push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, - ER_BINLOG_PURGE_FATAL_ERR, - "a problem with deleting %s; " - "consider examining correspondence " - "of your binlog index file " - "to the actual binlog files", - log_info.log_file_name); + if (thd) + { + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with deleting %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + } + else + { + sql_print_information("Failed to delete file '%s'; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + } if (my_errno == EMFILE) { DBUG_PRINT("info", ("my_errno: %d, set ret = LOG_INFO_EMFILE", my_errno)); error= LOG_INFO_EMFILE; + goto err; } error= LOG_INFO_FATAL; goto err; |