From: Kristofer Pettersson Date: July 21 2008 9:18am Subject: bzr commit into mysql-5.1 branch (kpettersson:2706) List-Archive: http://lists.mysql.com/commits/50101 Message-Id: <20080721091856.E3AF25300E9@Adventure> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///home/thek/Development/cpp/mysqlbzr/mysql-5.1-bugteam/ 2706 Kristofer Pettersson 2008-07-21 [merge] Manual merge modified: sql/log.cc === modified file 'sql/log.cc' --- a/sql/log.cc 2008-05-21 12:44:30 +0000 +++ b/sql/log.cc 2008-07-21 09:18:35 +0000 @@ -3070,6 +3070,7 @@ int MYSQL_BIN_LOG::purge_logs(const char 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 } 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;