summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-11 19:12:21 +0100
committerSergei Golubchik <serg@mariadb.org>2017-01-11 20:24:40 +0100
commit0d1d0d77f2a72d9cb6de0489dceb37644caf9037 (patch)
tree98b7c0fa65468555ffab1441c8b10c999aff15db /sql/table.cc
parentab93a4d4df7206833fa4a8eb0aa47b8ba185da60 (diff)
downloadmariadb-git-0d1d0d77f2a72d9cb6de0489dceb37644caf9037.tar.gz
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.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/table.cc b/sql/table.cc
index db18214165e..1330560b6b6 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -6557,11 +6557,9 @@ bool is_simple_order(ORDER *order)
@details
The function computes the values of the virtual columns of the table and
stores them in the table record buffer.
- If vcol_update_mode is set to VCOL_UPDATE_ALL then all virtual column are
- computed. Otherwise, only fields from vcol_set are computed: all of them,
- if vcol_update_mode is set to VCOL_UPDATE_FOR_WRITE, and, only those with
- the stored_in_db flag set to false, if vcol_update_mode is equal to
- VCOL_UPDATE_FOR_READ.
+ Only fields from vcol_set are computed: all of them, if vcol_update_mode is
+ set to VCOL_UPDATE_FOR_WRITE, and, only those with the stored_in_db flag
+ set to false, if vcol_update_mode is equal to VCOL_UPDATE_FOR_READ.
@retval
0 Success
@@ -6583,9 +6581,8 @@ int update_virtual_fields(THD *thd, TABLE *table,
{
vfield= (*vfield_ptr);
DBUG_ASSERT(vfield->vcol_info && vfield->vcol_info->expr_item);
- if ((bitmap_is_set(table->vcol_set, vfield->field_index) &&
- (vcol_update_mode == VCOL_UPDATE_FOR_WRITE || !vfield->stored_in_db)) ||
- vcol_update_mode == VCOL_UPDATE_ALL)
+ if (bitmap_is_set(table->vcol_set, vfield->field_index) &&
+ (vcol_update_mode == VCOL_UPDATE_FOR_WRITE || !vfield->stored_in_db))
{
/* Compute the actual value of the virtual fields */
error= vfield->vcol_info->expr_item->save_in_field(vfield, 0);