summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 203173f52f4..b085d37be78 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -641,6 +641,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
close_temporary(table,0);
+ if (thd->slave_thread)
+ --slave_open_temp_tables;
*fn_ext(path)=0; // Remove the .frm extension
ha_create_table(path, &create_info,1);
// We don't need to call invalidate() because this table is not in cache