diff options
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index babfe1722a3..39701774b0e 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -353,9 +353,10 @@ int mysql_update(THD *thd, transactional_table= table->file->has_transactions(); thd->no_trans_update= 0; - thd->abort_on_warning= test(thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | - MODE_STRICT_ALL_TABLES)); + thd->abort_on_warning= test(handle_duplicates != DUP_IGNORE && + (thd->variables.sql_mode & + (MODE_STRICT_TRANS_TABLES | + MODE_STRICT_ALL_TABLES))); while (!(error=info.read_record(&info)) && !thd->killed) { @@ -470,6 +471,7 @@ int mysql_update(THD *thd, DBUG_PRINT("info",("%d records updated",updated)); } thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */ + thd->abort_on_warning= 0; free_io_cache(table); DBUG_RETURN(0); |