diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-10-01 13:39:49 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-10-01 13:39:49 +0200 |
commit | cfcf51b719b73c3dd5b854b14dc4829f3a5b7650 (patch) | |
tree | 091a2e59c87cb003723f6af8740cfa8647842ef4 /sql/ha_partition.cc | |
parent | 0b7c5f4dcc496a9bbae17e386552d2d36700c3e9 (diff) | |
parent | 814fbc5b6f2bf40c91bfb01dfa1bcf711af01d76 (diff) | |
download | mariadb-git-cfcf51b719b73c3dd5b854b14dc4829f3a5b7650.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 ee24a36985e..52e39f397a6 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -2451,6 +2451,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_part_data= (HA_DATA_PARTITION*) ha_data; + pthread_mutex_destroy(&ha_part_data->LOCK_auto_inc); + } +} + /* Open handler object @@ -2607,6 +2622,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; + VOID(pthread_mutex_init(&ha_data->LOCK_auto_inc, MY_MUTEX_INIT_FAST)); } if (is_not_tmp_table) pthread_mutex_unlock(&table_share->mutex); |