diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-06-28 10:10:49 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-28 12:54:01 +0200 |
commit | 6ce20fb2b9fe57330c797694b9dbea4028f40d7c (patch) | |
tree | 204929c9a26b0e4f9cbda12309a20e167ae60e5a /sql/sql_base.cc | |
parent | 9c38308d8fa62da5c4be3ed7ad6d6c43fe8e7363 (diff) | |
download | mariadb-git-6ce20fb2b9fe57330c797694b9dbea4028f40d7c.tar.gz |
MDEV-9428 NO_AUTO_VALUE_ON_ZERO is ignored when a trigger before insert is defined
fix the *other* fill_record() too, arrgh!
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index e808fbafb50..8c1c32e28f6 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8728,7 +8728,8 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values, value=v++; Field *rfield= field->field; TABLE* table= rfield->table; - if (rfield == table->next_number_field) + if (table->next_number_field && + rfield->field_index == table->next_number_field->field_index) table->auto_increment_field_not_null= TRUE; if (rfield->vcol_info && value->type() != Item::DEFAULT_VALUE_ITEM && |