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

 2735 Konstantin Osipov	2009-02-27
      Bug#37433 "Deadlock between open_table, close_open_tables, 
      get_table_share, drop_open_table"
      Additional fix: implement and assign the optional destructor.
      (Missed to include a file into the changeset).
modified:
  sql/ha_partition.cc

per-file messages:
  sql/ha_partition.cc
    Declare and invoke an optional destructor for HA_DATA_PARTITION.
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2009-02-19 13:06:05 +0000
+++ b/sql/ha_partition.cc	2009-02-26 21:48:52 +0000
@@ -2381,6 +2381,21 @@ err1:
 /****************************************************************************
                 MODULE open/close object
 ****************************************************************************/
+
+
+/**
+  A destructor for partition-specific TABLE_SHARE data.
+*/
+
+void ha_data_partition_destroy(void *ha_data)
+{
+  if (ha_data)
+  {
+    HA_DATA_PARTITION *ha_data_partition= (HA_DATA_PARTITION*) ha_data;
+    pthread_mutex_destroy(&ha_data_partition->mutex);
+  }
+}
+
 /*
   Open handler object
 
@@ -2536,6 +2551,7 @@ int ha_partition::open(const char *name,
     }
     DBUG_PRINT("info", ("table_share->ha_data 0x%p", ha_data));
     bzero(ha_data, sizeof(HA_DATA_PARTITION));
+    table_share->ha_data_destroy= ha_data_partition_destroy;
     pthread_mutex_init(&ha_data->mutex, MY_MUTEX_INIT_FAST);
   }
   if (is_not_tmp_table)

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