[Commits] Rev 3017: If mysqld --log-warnings=3 or higher, then print all check and repair warnings for MyISAM tables to the log. in lp:maria/5.2

Michael Widenius monty at askmonty.org
Tue Aug 16 13:06:07 EEST 2011


At lp:maria/5.2

------------------------------------------------------------
revno: 3017
revision-id: monty at askmonty.org-20110816100607-lz1b04v0fipym3aj
parent: monty at askmonty.org-20110816093206-qidzyp1474dozka2
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.2
timestamp: Tue 2011-08-16 13:06:07 +0300
message:
  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.
-------------- next part --------------
=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2011-06-24 09:08:45 +0000
+++ b/storage/myisam/ha_myisam.cc	2011-08-16 10:06:07 +0000
@@ -123,6 +123,9 @@ static void mi_check_print_msg(HA_CHECK
   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);



More information about the commits mailing list