diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 167ccf974c7..0a83358e8c6 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1367,6 +1367,8 @@ void select_insert::send_error(uint errcode,const char *err) table->file->has_transactions()); mysql_bin_log.write(&qinfo); } + if (!table->tmp_table) + thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } ha_rollback_stmt(thd); if (info.copied || info.deleted) @@ -1398,6 +1400,8 @@ bool select_insert::send_eof() if (info.copied || info.deleted) { query_cache_invalidate3(thd, table, 1); + if (!(table->file->has_transactions() || table->tmp_table)) + thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } if (error) { |