MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:December 10 2009 1:38pm
Subject:bzr commit into mysql-5.6-next-mr branch (kostja:3026) Bug#39396
View as plain text  
#At file:///opt/local/work/next-4284/ based on revid:jon.hauglid@stripped

 3026 Konstantin Osipov	2009-12-10
      Backport a part of Monty's fix for Bug#39396, rev. 2736.2.11 
      "ha_maria.cc:2415: assertion in ha_maria::store_lock()".
     @ sql/lock.cc
        Fixed wrong cleanup of mysql_lock_tables()
        - We must call read_lock_data() BEFORE we set 
        lock_count to 0. Added DBUG statements.

    modified:
      sql/lock.cc
=== modified file 'sql/lock.cc'
--- a/sql/lock.cc	2009-12-10 08:41:03 +0000
+++ b/sql/lock.cc	2009-12-10 13:38:03 +0000
@@ -168,9 +168,8 @@ int mysql_lock_tables_check(THD *thd, TA
   DBUG_RETURN(0);
 }
 
-
 /**
-  Reset lock type in lock data and free.
+  Reset lock type in lock data
 
   @param mysql_lock Lock structures to reset.
 
@@ -328,6 +327,13 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, 
     }
     else if (rc == 1)                           /* aborted or killed */
     {
+      /*
+        reset_lock_data is required here. If thr_multi_lock fails it
+        resets lock type for tables, which were locked before (and
+        including) one that caused error. Lock type for other tables
+        preserved.
+      */
+      reset_lock_data(sql_lock);
       thd->some_tables_deleted=1;		// Try again
       sql_lock->lock_count= 0;                  // Locks are already freed
       // Fall through: unlock, reset lock data, free and retry


Attachment: [text/bzr-bundle] bzr/kostja@sun.com-20091210133803-i4wux7npwaa6n3do.bundle
Thread
bzr commit into mysql-5.6-next-mr branch (kostja:3026) Bug#39396Konstantin Osipov10 Dec