diff options
Diffstat (limited to '')
-rw-r--r-- | sql/temporary_tables.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index ecbfdde1..fa9abf7b 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -1588,6 +1588,11 @@ void THD::close_unused_temporary_table_instances(const TABLE_LIST *tl) { /* Note: removing current list element doesn't invalidate iterator. */ share->all_tmp_tables.remove(table); + /* + At least one instance should be left (guaratead by calling this + function for table which is opened and the table is under processing) + */ + DBUG_ASSERT(share->all_tmp_tables.front()); free_temporary_table(table); } } |