summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-08-16 13:06:07 +0300
committerMichael Widenius <monty@askmonty.org>2011-08-16 13:06:07 +0300
commita75dbb41586a6094bd05160f02b5189316914802 (patch)
tree56efb705f0b1463e814c1c7ccf62c8a78085dfea
parent8ce93bbd64a38514de82e73fade36ba703ada5dd (diff)
downloadmariadb-git-a75dbb41586a6094bd05160f02b5189316914802.tar.gz
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.
-rw-r--r--storage/myisam/ha_myisam.cc3
1 files changed, 3 insertions, 0 deletions
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(&param->print_msg_mutex);