From a75dbb41586a6094bd05160f02b5189316914802 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 16 Aug 2011 13:06:07 +0300 Subject: [PATCH] If mysqld --log-warnings=3 or higher, then print all check and repair warnings for MyISAM tables to the log. This is useful when trying to find out why an automatic myisam repair failes. storage/myisam/ha_myisam.cc: If mysqld --log-warnings=3 or higher, then print all check and repair warnings for MyISAM tables to the error log. --- storage/myisam/ha_myisam.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index d19f9a18b11..e73eb545c3b 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -123,6 +123,9 @@ static void mi_check_print_msg(HA_CHECK *param, const char* msg_type, if (protocol->write()) sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n", msgbuf); + else if (thd->variables.log_warnings > 2) + sql_print_error("%s", msgbuf); + #ifdef THREAD if (param->need_print_msg_lock) pthread_mutex_unlock(¶m->print_msg_mutex);