From bad2f1569da57c4a81cc84ec2f4a79924df9c8d6 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 12 Sep 2018 16:36:45 +0400 Subject: MDEV-17167 - InnoDB: Failing assertion: table->get_ref_count() == 0 upon truncating a temporary table TRUNCATE expects only one TABLE instance (which is used by TRUNCATE itself) to be open. However this requirement wasn't enforced after "MDEV-5535: Cannot reopen temporary table". Fixed by closing unused table instances before performing TRUNCATE. --- sql/sql_plist.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/sql_plist.h') diff --git a/sql/sql_plist.h b/sql/sql_plist.h index bb9889cc534..4d279af7a0d 100644 --- a/sql/sql_plist.h +++ b/sql/sql_plist.h @@ -184,7 +184,12 @@ public: list= &a; current= a.m_first; } - /* Operator for it++ */ + /** + Operator for it++ + + @note since we save next element pointer, caller may remove current element. + Such modification doesn't invalidate iterator. + */ inline T* operator++(int) { T *result= current; -- cgit v1.2.1