summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorGalina Shalygina <galashalygina@gmail.com>2016-05-25 00:34:13 +0300
committerGalina Shalygina <galashalygina@gmail.com>2016-05-25 00:34:13 +0300
commit6c6c3af6aac428df8a934beeba15cc4ce77cbe01 (patch)
tree2f8241944db8952e6a54a417414773dd0b5b0b4e /sql/sql_base.cc
parentb4f1f42062d108230b62ad49fedd93ee6e38e168 (diff)
parentc7c2f8d4a0dedd52795b7f8a6971c35ea46cc016 (diff)
downloadmariadb-git-10.2-test1234.tar.gz
Merge branch '10.2' into 10.2-mdev986410.2-test1234
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 18e7ee950e6..08a9647cf56 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -793,23 +793,6 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
/**
- Auxiliary function to close all tables in the open_tables list.
-
- @param thd Thread context.
-
- @remark It should not ordinarily be called directly.
-*/
-
-static void close_open_tables(THD *thd)
-{
- DBUG_PRINT("info", ("thd->open_tables: 0x%lx", (long) thd->open_tables));
-
- while (thd->open_tables)
- (void) close_thread_table(thd, &thd->open_tables);
-}
-
-
-/**
Close all open instances of the table but keep the MDL lock.
Works both under LOCK TABLES and in the normal mode.
@@ -1028,8 +1011,8 @@ void close_thread_tables(THD *thd)
Closing a MERGE child before the parent would be fatal if the
other thread tries to abort the MERGE lock in between.
*/
- if (thd->open_tables)
- close_open_tables(thd);
+ while (thd->open_tables)
+ (void) close_thread_table(thd, &thd->open_tables);
DBUG_VOID_RETURN;
}