List:Commits« Previous MessageNext Message »
From:Petr Chardin Date:April 10 2006 10:55am
Subject:bk commit into 5.1 tree (petr:1.2292) BUG#18848
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2292 06/04/10 12:55:33 petr@stripped +1 -0
  fix for Bug#18848  "SIGHUP crashes the server"

  sql/log.cc
    1.202 06/04/10 12:55:25 petr@stripped +18 -11
    check whether log tables were initialized, before trying to
    flush them during sighup processing.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	petr
# Host:	owlet.
# Root:	/home/cps/mysql/trees/mysql-5.1-virgin

--- 1.201/sql/log.cc	2006-03-29 18:28:33 +04:00
+++ 1.202/sql/log.cc	2006-04-10 12:55:25 +04:00
@@ -680,20 +680,27 @@
   /* reopen log files */
   file_log_handler->flush();
 
-  /*
-    this will lock and wait for all but the logger thread to release the
-    tables. Then we could reopen log tables. Then release the name locks.
-  */
-  lock_and_wait_for_table_name(thd, &close_slow_log);
-  lock_and_wait_for_table_name(thd, &close_general_log);
+  /* flush tables, in the case they are enabled */
+  if (logger.is_log_tables_initialized)
+  {
+    /*
+      This will lock and wait for all but the logger thread to release the
+      tables. Then we could reopen log tables. Then release the name locks.
+    */
+    lock_and_wait_for_table_name(thd, &close_slow_log);
+    lock_and_wait_for_table_name(thd, &close_general_log);
 
-  /* deny others from logging to general and slow log, while reopening tables */
-  logger.lock();
+    /*
+      Deny others from logging to general and slow log,
+      while reopening tables.
+    */
+    logger.lock();
 
-  table_log_handler->flush(thd, &close_slow_log, &close_general_log);
+    table_log_handler->flush(thd, &close_slow_log, &close_general_log);
 
-  /* end of log tables flush */
-  logger.unlock();
+    /* end of log tables flush */
+    logger.unlock();
+  }
   return FALSE;
 }
 
Thread
bk commit into 5.1 tree (petr:1.2292) BUG#18848Petr Chardin10 Apr