mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge with 4.0
This commit is contained in:
@ -498,11 +498,14 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
char *db= table_list->db;
|
||||
uint key_length;
|
||||
DBUG_ENTER("lock_table_name");
|
||||
DBUG_PRINT("enter",("db: %s name: %s", db, table_list->real_name));
|
||||
|
||||
safe_mutex_assert_owner(&LOCK_open);
|
||||
|
||||
key_length=(uint) (strmov(strmov(key,db)+1,table_list->real_name)
|
||||
-key)+ 1;
|
||||
|
||||
|
||||
/* Only insert the table if we haven't insert it already */
|
||||
for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ;
|
||||
table ;
|
||||
@ -534,6 +537,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
void unlock_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
{
|
||||
if (table_list->table)
|
||||
@ -543,6 +547,7 @@ void unlock_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool locked_named_table(THD *thd, TABLE_LIST *table_list)
|
||||
{
|
||||
for (; table_list ; table_list=table_list->next)
|
||||
|
Reference in New Issue
Block a user