MySQL Lists are EOL. Please join:

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

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
  This patch fixes sporadical failures of handler_myisam/innodb tests
  which were introduced by previous fix for this bug.

  sql/, 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/ b/sql/
--- a/sql/	2007-10-09 12:02:57 -03:00
+++ b/sql/	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;
bk commit into 5.0 tree (davi:1.2540) BUG#31409Davi Arnaut12 Oct