summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 16ab4ee650a..6e6a3228d80 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4421,6 +4421,15 @@ void select_create::store_values(List<Item> &values)
bool select_create::send_eof()
{
DBUG_ENTER("select_create::send_eof");
+
+ /*
+ The routine that writes the statement in the binary log
+ is in select_insert::prepare_eof(). For that reason, we
+ mark the flag at this point.
+ */
+ if (table->s->tmp_table)
+ thd->transaction.stmt.mark_created_temp_table();
+
if (prepare_eof())
{
abort_result_set();