diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-11-03 12:37:02 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-11-03 12:37:02 +0100 |
commit | 092cf82871a783286033c19193d64c23d975a615 (patch) | |
tree | 850f4bb2579f83fce380d670e77b4af5532c6bfd /sql/ha_partition.cc | |
parent | 9c825ffc78a9dc847ef5d103cc85e0295811161f (diff) | |
parent | bb5efb2c4bb612d3a548344ae4e41d5828956e2e (diff) | |
download | mariadb-git-092cf82871a783286033c19193d64c23d975a615.tar.gz |
Merge
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index b5bba25315c..7e5eccb2374 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -2452,6 +2452,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 @@ -2608,6 +2623,8 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked) } 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) pthread_mutex_unlock(&table_share->mutex); |