List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:October 27 2010 3:20am
Subject:bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3547) Bug#56619
View as plain text  
#At file:///Users/shulga/projects/mysql/5.1-bugteam-bug56619/ based on revid:bjorn.munch@stripped

 3547 Dmitry Shulga	2010-10-27
      Fixed bug#56619 - Assertion failed during
      ALTER TABLE RENAME, DISABLE KEYS.
     @ sql/sql_table.cc
        mysql_alter_table() modified: moved acquisition of LOCK_open
        after call to ha_autocommit_or_rollback.

    modified:
      sql/sql_table.cc
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2010-10-19 10:27:09 +0000
+++ b/sql/sql_table.cc	2010-10-27 03:20:29 +0000
@@ -6832,7 +6832,6 @@ view_err:
 			  table->alias);
     }
 
-    VOID(pthread_mutex_lock(&LOCK_open));
     /*
       Unlike to the above case close_cached_table() below will remove ALL
       instances of TABLE from table cache (it will also remove table lock
@@ -6853,6 +6852,7 @@ view_err:
       */
       ha_autocommit_or_rollback(thd, 0);
 
+      VOID(pthread_mutex_lock(&LOCK_open));
       /*
         Then do a 'simple' rename of the table. First we need to close all
         instances of 'source' table.
@@ -6884,7 +6884,8 @@ view_err:
           error= -1;
         }
       }
-    }
+    } else
+      VOID(pthread_mutex_lock(&LOCK_open));
 
     if (error == HA_ERR_WRONG_COMMAND)
     {


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20101027032029-ilgbsz2vyvqrqvty.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3547) Bug#56619Dmitry Shulga27 Oct