Commit a543ae03 authored by Alfranio Correia's avatar Alfranio Correia

BUG#49638 binlog_index fails in mysql-trunk-merge

Calling push_warning/push_warning_printf with a level of
WARN_LEVEL_ERROR *is* a bug. We should either use my_error(),
or WARN_LEVEL_WARN.
parent 1a06f6e3
...@@ -38,7 +38,7 @@ purge binary logs TO 'master-bin.000002'; ...@@ -38,7 +38,7 @@ purge binary logs TO 'master-bin.000002';
ERROR HY000: Fatal error during log purge ERROR HY000: Fatal error during log purge
show warnings; show warnings;
Level Code Message Level Code Message
Error 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files Warning 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
Error 1377 Fatal error during log purge Error 1377 Fatal error during log purge
reset master; reset master;
# crash_purge_before_update_index # crash_purge_before_update_index
......
...@@ -3014,7 +3014,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) ...@@ -3014,7 +3014,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
} }
else else
{ {
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; " "a problem with deleting %s; "
"consider examining correspondence " "consider examining correspondence "
...@@ -3045,7 +3045,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) ...@@ -3045,7 +3045,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
} }
else else
{ {
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; " "a problem with deleting %s; "
"consider examining correspondence " "consider examining correspondence "
...@@ -3481,7 +3481,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space, ...@@ -3481,7 +3481,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
*/ */
if (thd) if (thd)
{ {
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with getting info on being purged %s; " "a problem with getting info on being purged %s; "
"consider examining correspondence " "consider examining correspondence "
...@@ -3509,7 +3509,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space, ...@@ -3509,7 +3509,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
{ {
if (thd) if (thd)
{ {
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s and " "a problem with deleting %s and "
"reading the binlog index file", "reading the binlog index file",
...@@ -3557,7 +3557,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space, ...@@ -3557,7 +3557,7 @@ int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space,
{ {
if (thd) if (thd)
{ {
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; " "a problem with deleting %s; "
"consider examining correspondence " "consider examining correspondence "
...@@ -3647,7 +3647,7 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time) ...@@ -3647,7 +3647,7 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
*/ */
if (thd) if (thd)
{ {
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR, ER_BINLOG_PURGE_FATAL_ERR,
"a problem with getting info on being purged %s; " "a problem with getting info on being purged %s; "
"consider examining correspondence " "consider examining correspondence "
......
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