Skip to content

Commit 7532dbf

Browse files
committed
BUG#19894987: HANDLE_FATAL_SIGNAL (SIG=11) IN HA_INDEX_OR_RND_END | SQL/HANDLER.H:1999
Post-push fix: Fix ASAN warnings.
1 parent a3ebf76 commit 7532dbf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sql/sql_base.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -1736,10 +1736,12 @@ bool close_temporary_tables(THD *thd)
17361736
mysql_ha_rm_temporary_tables(thd);
17371737
if (!mysql_bin_log.is_open())
17381738
{
1739-
for (TABLE *t= thd->temporary_tables; t; t= t->next)
1739+
TABLE *tmp_next;
1740+
for (TABLE *t= thd->temporary_tables; t; t= tmp_next)
17401741
{
1741-
mysql_lock_remove(thd, thd->lock, t);
1742-
close_temporary(t, 1, 1);
1742+
tmp_next= t->next;
1743+
mysql_lock_remove(thd, thd->lock, t);
1744+
close_temporary(t, 1, 1);
17431745
}
17441746

17451747
thd->temporary_tables= 0;

0 commit comments

Comments
 (0)