List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:February 26 2009 9:37pm
Subject:bzr commit into mysql-6.0 branch (kostja:2734) Bug#37433
View as plain text  
#At file:///opt/local/work/mysql-6.0-runtime/ based on revid:kostja@stripped

 2734 Konstantin Osipov	2009-02-27
      Bug#37433 Deadlock between open_table, close_open_tables,
      get_table_share, drop_open_table.
      
      Additonal fix.
      Destroy the newly added mutex in ha_partition TABLE_SHARE::ha_data.
modified:
  sql/table.cc
  sql/table.h

per-file messages:
  sql/table.cc
    Invoke an optional destructor for TABLE_SHARE::ha_data.
  sql/table.h
    Declare an optional destructor function.
=== modified file 'sql/table.cc'
--- a/sql/table.cc	2009-02-19 13:06:05 +0000
+++ b/sql/table.cc	2009-02-26 21:37:40 +0000
@@ -475,6 +475,8 @@ void free_table_share(TABLE_SHARE *share
   if (share->tmp_table == NO_TMP_TABLE)
     pthread_mutex_destroy(&share->LOCK_ha_data);
   my_hash_free(&share->name_hash);
+  if (share->ha_data_destroy)
+    share->ha_data_destroy(share->ha_data);
 
   plugin_unlock(NULL, share->db_plugin);
   share->db_plugin= NULL;

=== modified file 'sql/table.h'
--- a/sql/table.h	2009-02-13 16:30:54 +0000
+++ b/sql/table.h	2009-02-26 21:37:40 +0000
@@ -431,6 +431,7 @@ struct TABLE_SHARE
 
   /** place to store storage engine specific data */
   void *ha_data;
+  void (*ha_data_destroy)(void *); /* An optional destructor for ha_data */
 
 
   /*

Thread
bzr commit into mysql-6.0 branch (kostja:2734) Bug#37433Konstantin Osipov26 Feb