From 0d1d0d77f2a72d9cb6de0489dceb37644caf9037 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 11 Jan 2017 19:12:21 +0100 Subject: MDEV-11706 Assertion `is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))' failed in Field_time::store_TIME_with_warning vcols and triggers. Revert 094f4cf77890c5a747a57cf2bed149b0b6933507, backport the correct fix (Table_triggers_list::mark_fields_used() not marking vcols) from 10.2. --- sql/sql_update.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index f134e0ba266..060952a589d 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -569,9 +569,7 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { if (table->vfield) - update_virtual_fields(thd, table, - table->triggers ? VCOL_UPDATE_ALL : - VCOL_UPDATE_FOR_READ); + update_virtual_fields(thd, table, VCOL_UPDATE_FOR_READ); thd->examined_row_count++; if (!select || (error= select->skip_record(thd)) > 0) { @@ -695,9 +693,7 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { if (table->vfield) - update_virtual_fields(thd, table, - table->triggers ? VCOL_UPDATE_ALL : - VCOL_UPDATE_FOR_READ); + update_virtual_fields(thd, table, VCOL_UPDATE_FOR_READ); thd->examined_row_count++; if (!select || select->skip_record(thd) > 0) { @@ -2235,10 +2231,7 @@ int multi_update::do_updates() { int error; if (table->vfield && - update_virtual_fields(thd, table, - (table->triggers ? - VCOL_UPDATE_ALL : - VCOL_UPDATE_FOR_WRITE))) + update_virtual_fields(thd, table, VCOL_UPDATE_FOR_WRITE)) goto err2; if ((error= cur_table->view_check_option(thd, ignore)) != VIEW_CHECK_OK) -- cgit v1.2.1