mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed LP bug #798621.
The patch for bugs 717577 and 724942 has missed to make adjustments for the call item_equal->add_const(const_item, orig_field_item) in the function check_simple_equality that builds multiple equality for a field and a constant. As a result, when this field happens to be a view field and the corresponding Item_field object F is wrapped in an Item_direct_view_ref object R the object F is placed in the multiple equality instead of the object R. A substitution of an equal item for F potentially can cause very serious problems and in some cases can lead to crashes of the server.
This commit is contained in:
@@ -10334,7 +10334,7 @@ static bool check_simple_equality(Item *left_item, Item *right_item,
|
||||
!((Item_field*)left_item)->get_depended_from() &&
|
||||
right_item->const_item() && !right_item->is_expensive())
|
||||
{
|
||||
orig_field_item= left_item;
|
||||
orig_field_item= orig_left_item;
|
||||
field_item= (Item_field *) left_item;
|
||||
const_item= right_item;
|
||||
}
|
||||
@@ -10342,7 +10342,7 @@ static bool check_simple_equality(Item *left_item, Item *right_item,
|
||||
!((Item_field*)right_item)->get_depended_from() &&
|
||||
left_item->const_item() && !left_item->is_expensive())
|
||||
{
|
||||
orig_field_item= right_item;
|
||||
orig_field_item= orig_right_item;
|
||||
field_item= (Item_field *) right_item;
|
||||
const_item= left_item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user