mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Auto-merge from mysql-next-mr-summit0.3.
This commit is contained in:
@ -2555,6 +2555,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
char key[MAX_DBKEY_LENGTH];
|
||||
uint key_length;
|
||||
char *alias= table_list->alias;
|
||||
my_hash_value_type hash_value;
|
||||
HASH_SEARCH_STATE state;
|
||||
DBUG_ENTER("open_table");
|
||||
|
||||
@ -2741,6 +2742,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
on disk.
|
||||
*/
|
||||
|
||||
hash_value= my_calc_hash(&open_cache, (uchar*) key, key_length);
|
||||
pthread_mutex_lock(&LOCK_open);
|
||||
|
||||
/*
|
||||
@ -2783,8 +2785,11 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
an implicit "pending locks queue" - see
|
||||
wait_for_locked_table_names for details.
|
||||
*/
|
||||
for (table= (TABLE*) my_hash_first(&open_cache, (uchar*) key, key_length,
|
||||
&state);
|
||||
for (table= (TABLE*) my_hash_first_from_hash_value(&open_cache,
|
||||
hash_value,
|
||||
(uchar*) key,
|
||||
key_length,
|
||||
&state);
|
||||
table && table->in_use ;
|
||||
table= (TABLE*) my_hash_next(&open_cache, (uchar*) key, key_length,
|
||||
&state))
|
||||
|
Reference in New Issue
Block a user