diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-09-04 14:02:01 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-09-04 15:37:23 +0200 |
commit | 8dca4cf53ff9d738d39730014d79205d6fd014fd (patch) | |
tree | 9781e3e4fc2e8c859bafe25a791ee2c456779752 /sql/sql_base.cc | |
parent | 53ec9047c91c66644799ad058e998a7cfe1afef0 (diff) | |
download | mariadb-git-8dca4cf53ff9d738d39730014d79205d6fd014fd.tar.gz |
MDEV-20403 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIMESTAMP..ON UPDATE
remove a special treatment of a bare DEFAULT keyword that made it
behave inconsistently and differently from DEFAULT(column).
Now all forms of the explicit assignment of a default column value
behave identically, and all count as an explicitly assigned value
(for the purpose of ON UPDATE NOW).
followup for c7c481f4d91
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f7f7d50bc85..5e34958bf59 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8068,7 +8068,7 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values, my_message(ER_UNKNOWN_ERROR, ER_THD(thd, ER_UNKNOWN_ERROR), MYF(0)); goto err; } - rfield->set_explicit_default(value); + rfield->set_has_explicit_value(); } if (update) @@ -8265,7 +8265,6 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values, { List_iterator_fast<Item> v(values); List<TABLE> tbl_list; - bool all_fields_have_values= true; Item *value; Field *field; bool abort_on_warning_saved= thd->abort_on_warning; @@ -8318,11 +8317,8 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values, else if (value->save_in_field(field, 0) < 0) goto err; - all_fields_have_values &= field->set_explicit_default(value); + field->set_has_explicit_value(); } - if (!all_fields_have_values && table->default_field && - table->update_default_fields(ignore_errors)) - goto err; /* Update virtual fields */ thd->abort_on_warning= FALSE; if (table->vfield && |