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/field.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/field.cc')
-rw-r--r-- | sql/field.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sql/field.cc b/sql/field.cc index 30edee0e386..2b1ba0e1372 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -11106,33 +11106,6 @@ key_map Field::get_possible_keys() } -/** - Mark the field as having an explicit default value. - - @param value if available, the value that the field is being set to - - @note - Fields that have an explicit default value should not be updated - automatically via the DEFAULT or ON UPDATE functions. The functions - that deal with data change functionality (INSERT/UPDATE/LOAD), - determine if there is an explicit value for each field before performing - the data change, and call this method to mark the field. - - If the 'value' parameter is NULL, then the field is marked unconditionally - as having an explicit value. If 'value' is not NULL, then it can be further - analyzed to check if it really should count as a value. -*/ - -bool Field::set_explicit_default(Item *value) -{ - if (value->type() == Item::DEFAULT_VALUE_ITEM && - !((Item_default_value*)value)->arg) - return false; - set_has_explicit_value(); - return true; -} - - bool Field::validate_value_in_record_with_warn(THD *thd, const uchar *record) { my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); |