summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-12-29 19:09:11 +0400
committerSergey Vojtovich <svoj@mariadb.org>2016-01-29 12:59:52 +0400
commiteff48be5f1f9aedd2b0d6690d0883d05ef7f44a1 (patch)
tree275320be953268d0fc59962f6e1a27f418228ab2
parenta849d1bac80f2b38bc6bc170388e2f3cc1d4e1ad (diff)
downloadmariadb-git-bb-10.2-tc.tar.gz
MDEV-9488 - Table cache cleanupsbb-10.2-tc
Cleanup now unused arguments of tdc_open_view().
-rw-r--r--sql/sql_base.cc10
-rw-r--r--sql/sql_base.h11
-rw-r--r--sql/sql_view.cc2
3 files changed, 4 insertions, 19 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 11741e45578..f5acf5b8b3a 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2294,8 +2294,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
*/
if (dd_frm_is_view(thd, path))
{
- if (!tdc_open_view(thd, table_list, alias, key, key_length,
- CHECK_METADATA_VERSION))
+ if (!tdc_open_view(thd, table_list, CHECK_METADATA_VERSION))
{
DBUG_ASSERT(table_list->view != 0);
DBUG_RETURN(FALSE); // VIEW
@@ -3263,9 +3262,6 @@ check_and_update_routine_version(THD *thd, Sroutine_hash_entry *rt,
@param thd Thread handle
@param table_list TABLE_LIST with db, table_name & belong_to_view
- @param alias Alias name
- @param cache_key Key for table definition cache
- @param cache_key_length Length of cache_key
@param flags Flags which modify how we open the view
@todo This function is needed for special handling of views under
@@ -3274,9 +3270,7 @@ check_and_update_routine_version(THD *thd, Sroutine_hash_entry *rt,
@return FALSE if success, TRUE - otherwise.
*/
-bool tdc_open_view(THD *thd, TABLE_LIST *table_list, const char *alias,
- const char *cache_key, uint cache_key_length,
- uint flags)
+bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags)
{
TABLE not_used;
TABLE_SHARE *share;
diff --git a/sql/sql_base.h b/sql/sql_base.h
index 7407e230419..ef249b3ab05 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -305,16 +305,7 @@ void close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
ha_extra_function extra,
TABLE *skip_table);
OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild);
-bool tdc_open_view(THD *thd, TABLE_LIST *table_list, const char *alias,
- const char *cache_key, uint cache_key_length, uint flags);
-
-static inline bool tdc_open_view(THD *thd, TABLE_LIST *table_list,
- const char *alias, uint flags)
-{
- const char *key;
- uint key_length= get_table_def_key(table_list, &key);
- return tdc_open_view(thd, table_list, alias, key, key_length, flags);
-}
+bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags);
TABLE *find_table_for_mdl_upgrade(THD *thd, const char *db,
const char *table_name,
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 62e6790a142..3c2e091099a 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -215,7 +215,7 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
TABLE_LIST decoy;
memcpy (&decoy, view, sizeof (TABLE_LIST));
- if (tdc_open_view(thd, &decoy, decoy.alias, OPEN_VIEW_NO_PARSE))
+ if (tdc_open_view(thd, &decoy, OPEN_VIEW_NO_PARSE))
return TRUE;
if (!lex->definer)