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.
This commit is contained in:
Michael Widenius 2011-08-16 13:06:07 +03:00
parent 8ce93bbd64
commit a75dbb4158

View File

@ -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);