List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:October 12 2007 1:55pm
Subject:bk commit into 5.0 tree (davi:1.2540) BUG#31409
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of davi. When davi 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@stripped, 2007-10-12 10:55:46-03:00, davi@stripped +1 -0
  Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
  
  If mysql_lock_tables fails because the lock was aborted, we need to
  reset thd->some_tables_delete, otherwise we might loop indefinitely
  because handler's tables are not closed in a standard way, meaning
  that close_thread_tables() (which resets some_tables_deleted) is not
  used.
  
  This patch fixes sporadical failures of handler_myisam/innodb tests
  which were introduced by previous fix for this bug.

  sql/sql_handler.cc@stripped, 2007-10-12 10:55:44-03:00, davi@stripped +6 -0
    Properly reset thd->some_tables_deleted if mysql_lock_tables
    fails for some reason.

diff -Nrup a/sql/sql_handler.cc b/sql/sql_handler.cc
--- a/sql/sql_handler.cc	2007-10-09 12:02:57 -03:00
+++ b/sql/sql_handler.cc	2007-10-12 10:55:44 -03:00
@@ -466,6 +466,12 @@ retry:
   {
     mysql_ha_close_table(thd, tables);
     hash_tables->table= NULL;
+    /*
+      The lock might have been aborted, we need to manually reset
+      thd->some_tables_deleted because handler's tables are closed
+      in a non-standard way. Otherwise we might loop indefinitely.
+    */
+    thd->some_tables_deleted= 0;
     goto retry;
   }
 
Thread
bk commit into 5.0 tree (davi:1.2540) BUG#31409Davi Arnaut12 Oct