diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-12-29 14:58:17 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2016-02-26 18:35:14 +0400 |
commit | c1d1c59888953d90ee2fb1ca32f9f44ca5b1055c (patch) | |
tree | 3599bbda8ff32499aced3b51f4d1fd22d78c516c /sql/table_cache.cc | |
parent | d3af8942350e87d809fdf4d9453d5210ada2d3d1 (diff) | |
download | mariadb-git-c1d1c59888953d90ee2fb1ca32f9f44ca5b1055c.tar.gz |
MDEV-9488 - Table cache cleanups
Remove tdc_acquire_share() helpers: they don't actually make things simpler.
Diffstat (limited to 'sql/table_cache.cc')
-rw-r--r-- | sql/table_cache.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/table_cache.cc b/sql/table_cache.cc index 19e8250f99d..5e7a69e21ed 100644 --- a/sql/table_cache.cc +++ b/sql/table_cache.cc @@ -598,13 +598,14 @@ void tdc_unlock_share(TDC_element *element) # Share for table */ -TABLE_SHARE *tdc_acquire_share(THD *thd, const char *db, const char *table_name, - const char *key, uint key_length, - my_hash_value_type hash_value, uint flags, +TABLE_SHARE *tdc_acquire_share(THD *thd, TABLE_LIST *tl, uint flags, TABLE **out_table) { TABLE_SHARE *share; TDC_element *element; + const char *key; + uint key_length= get_table_def_key(tl, &key); + my_hash_value_type hash_value= tl->mdl_request.key.tc_hash_value(); bool was_unused; DBUG_ENTER("tdc_acquire_share"); @@ -628,7 +629,7 @@ retry: lf_hash_search_unpin(thd->tdc_hash_pins); DBUG_ASSERT(element); - if (!(share= alloc_table_share(db, table_name, key, key_length))) + if (!(share= alloc_table_share(tl->db, tl->table_name, key, key_length))) { lf_hash_delete(&tdc_hash, thd->tdc_hash_pins, key, key_length); DBUG_RETURN(0); |