mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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
This commit is contained in:
@@ -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,8 +3884,9 @@ 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,
|
||||
(bool)(thd->set_query_id-1));
|
||||
field_to_set->table->file->
|
||||
ha_set_bit_in_rw_set(field_to_set->fieldnr,
|
||||
(bool)(thd->set_query_id-1));
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(fld);
|
||||
|
||||
Reference in New Issue
Block a user