Commit d0975266 authored by unknown's avatar unknown

Bug #17206 Update through VIEW is not working

post review fixes
Bug fix added missing setting of rw_set for table handler when update occurs via a view.   The missing setting of the rw_set resulted in fields not being updated for ndb tables

parent 39b79290
......@@ -3869,6 +3869,11 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
#endif
if (thd->set_query_id)
{
/*
* get rw_set correct for this field so that the handler
* knows that this field is involved in the query and gets
* retrieved/updated
*/
Field *field_to_set= NULL;
if (fld == view_ref_found)
{
......@@ -3879,7 +3884,8 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
else
field_to_set= fld;
if (field_to_set)
field_to_set->table->file->ha_set_bit_in_rw_set(field_to_set->fieldnr,
field_to_set->table->file->
ha_set_bit_in_rw_set(field_to_set->fieldnr,
(bool)(thd->set_query_id-1));
}
}
......
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