Commit a632df9d authored by Sergei Golubchik's avatar Sergei Golubchik

improve Item_field::register_field_in_read_map()

make it to work when read_set == vcol_set, that is, when
the caller wants to get a one complete bitmap of all fields
a particular vcol depends on.
parent 7459f0c0
......@@ -901,17 +901,15 @@ bool Item_field::find_item_in_field_list_processor(void *arg)
bool Item_field::register_field_in_read_map(void *arg)
{
TABLE *table= (TABLE *) arg;
if (field->table == table || !table)
bitmap_set_bit(field->table->read_set, field->field_index);
int res= 0;
if (field->vcol_info &&
!bitmap_is_set(field->table->vcol_set, field->field_index))
!bitmap_fast_test_and_set(field->table->vcol_set, field->field_index))
{
/* Ensure that the virtual fields is updated on read or write */
bitmap_set_bit(field->table->vcol_set, field->field_index);
return field->vcol_info->expr_item->walk(&Item::register_field_in_read_map,
1, arg);
res= field->vcol_info->expr_item->walk(&Item::register_field_in_read_map,1,arg);
}
return 0;
if (field->table == table || !table)
bitmap_set_bit(field->table->read_set, field->field_index);
return res;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment