mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user