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.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index f26ee27df42..697ac87bd53 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2114,6 +2114,8 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink)
goto after_trg_or_ignored_err;
}
+ if (info->handle_duplicates == DUP_ERROR && info->ignore)
+ table->file->extra(HA_EXTRA_IGNORE_INSERT);
after_trg_n_copied_inc:
info->copied++;
thd->record_first_successful_insert_id_in_cur_stmt(table->file->insert_id_for_cur_row);