diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 15:35:24 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 15:35:24 +0200 |
commit | 934115184b52a28a30d576a8a47d0ec66b1b0712 (patch) | |
tree | f033b3ade00af9e87bffd6fc2fdd4f40f7f11a5f /sql/sql_admin.cc | |
parent | b0a5dd73fa7d9f239661cc1683422f14e69c53eb (diff) | |
download | mariadb-git-934115184b52a28a30d576a8a47d0ec66b1b0712.tar.gz |
convenience helpers for get_table_share() and tdc_open_view().
Pass db and table_name into a function instead of the table_list,
when only db and table name are needed.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 0410d72bafc..e900353337a 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -100,8 +100,6 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, if (!(table= table_list->table)) { - char key[MAX_DBKEY_LENGTH]; - uint key_length; /* If the table didn't exist, we have a shared metadata lock on it that is left from mysql_admin_table()'s attempt to @@ -114,9 +112,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, Attempt to do full-blown table open in mysql_admin_table() has failed. Let us try to open at least a .FRM for this table. */ - my_hash_value_type hash_value; - key_length= create_table_def_key(thd, key, table_list, 0); table_list->mdl_request.init(MDL_key::TABLE, table_list->db, table_list->table_name, MDL_EXCLUSIVE, MDL_TRANSACTION); @@ -127,9 +123,8 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, DBUG_RETURN(0); has_mdl_lock= TRUE; - hash_value= my_calc_hash(&table_def_cache, (uchar*) key, key_length); - share= get_table_share(thd, table_list, key, key_length, - FRM_READ_TABLE_ONLY, ¬_used, hash_value); + share= get_table_share(thd, table_list->db, table_list->table_name, + FRM_READ_TABLE_ONLY, ¬_used); if (share == NULL) DBUG_RETURN(0); // Can't open frm file |