mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Backport of:
------------------------------------------------------------ revno: 2630.6.1 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Tue 2008-05-27 13:45:34 +0400 message: Remove an unused argument from release_table_share(). Remove unused members from TABLE_SHARE struct. Review comments in scope of WL#3726 "DDL locking for all metadata objects"
This commit is contained in:
10
sql/table.cc
10
sql/table.cc
@ -321,7 +321,6 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
|
||||
|
||||
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
|
||||
pthread_mutex_init(&share->mutex, MY_MUTEX_INIT_FAST);
|
||||
pthread_cond_init(&share->cond, NULL);
|
||||
}
|
||||
DBUG_RETURN(share);
|
||||
}
|
||||
@ -418,16 +417,9 @@ void free_table_share(TABLE_SHARE *share)
|
||||
*/
|
||||
if (share->tmp_table == NO_TMP_TABLE)
|
||||
{
|
||||
/* share->mutex is locked in release_table_share() */
|
||||
while (share->waiting_on_cond)
|
||||
{
|
||||
pthread_cond_broadcast(&share->cond);
|
||||
pthread_cond_wait(&share->cond, &share->mutex);
|
||||
}
|
||||
/* No thread refers to this anymore */
|
||||
pthread_mutex_unlock(&share->mutex);
|
||||
pthread_mutex_destroy(&share->mutex);
|
||||
pthread_cond_destroy(&share->cond);
|
||||
}
|
||||
my_hash_free(&share->name_hash);
|
||||
|
||||
@ -2001,7 +1993,7 @@ int closefrm(register TABLE *table, bool free_share)
|
||||
if (free_share)
|
||||
{
|
||||
if (table->s->tmp_table == NO_TMP_TABLE)
|
||||
release_table_share(table->s, RELEASE_NORMAL);
|
||||
release_table_share(table->s);
|
||||
else
|
||||
free_table_share(table->s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user