diff options
author | monty@mysql.com <> | 2004-03-16 22:41:30 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-03-16 22:41:30 +0200 |
commit | 350b4335696fc88efa2bbf2139d2f8bf9aa5701c (patch) | |
tree | af285d8080c003d1ecb1479ec43c9b6996fd567f /sql/lock.cc | |
parent | 861bf3c8c031ea80076acb7f7466bda73b23213c (diff) | |
parent | 325f6615254c871d71d9d71bb5910a61d9a61ea2 (diff) | |
download | mariadb-git-350b4335696fc88efa2bbf2139d2f8bf9aa5701c.tar.gz |
merge with 4.0
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 67a085ff708..171c880db3e 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -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) |