summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-09 15:34:27 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-09 15:34:27 +0200
commitd71b75c90d86f6a654a7e93ac383b4000533ffbc (patch)
treef91b486bf0cee267bc79a6dd62c9110c4a650400 /sql/sql_show.cc
parent163882665eed8c065953bdce05aaa152b6b5df0f (diff)
downloadmariadb-git-d71b75c90d86f6a654a7e93ac383b4000533ffbc.tar.gz
moving LOCK_open into get_table_share()
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 7afbd3a7f9c..45c3318987c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -4382,13 +4382,12 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
key_length= create_table_def_key(thd, key, &table_list, 0);
hash_value= my_calc_hash(&table_def_cache, (uchar*) key, key_length);
- mysql_mutex_lock(&LOCK_open);
share= get_table_share(thd, &table_list, key, key_length,
FRM_READ_NO_ERROR_FOR_VIEW, &not_used, hash_value);
if (!share)
{
res= 0;
- goto end_unlock;
+ goto end;
}
if (share->is_view)
@@ -4437,10 +4436,10 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
free_root(&tbl.mem_root, MYF(0));
}
+
end_share:
+ mysql_mutex_lock(&LOCK_open);
release_table_share(share);
-
-end_unlock:
mysql_mutex_unlock(&LOCK_open);
end: