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.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d25d831cac1..1c0c0301e7d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3655,10 +3655,8 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if (!res && fields->elements)
{
- bool saved_abort_on_warning= thd->abort_on_warning;
- thd->abort_on_warning= !info.ignore && thd->is_strict_mode();
+ Abort_on_warning_instant_set aws(thd, !info.ignore && thd->is_strict_mode());
res= check_that_all_fields_are_given_values(thd, table_list->table, table_list);
- thd->abort_on_warning= saved_abort_on_warning;
}
if (info.handle_duplicates == DUP_UPDATE && !res)