diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 746a04e03f3..3f43c902faa 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2897,7 +2897,11 @@ bool select_insert::send_data(List<Item> &values) DBUG_RETURN(1); } } - if (!(error= write_record(thd, table, &info))) + + error= write_record(thd, table, &info); + table->auto_increment_field_not_null= FALSE; + + if (!error) { if (table->triggers || info.handle_duplicates == DUP_UPDATE) { |