Re: [Maria-developers] [Commits] f87dddaaa95: MDEV-7865: Server crashes in Item_equal_iterator<List_iterator_fast, Item>::get_curr_field on query

On Sat, Oct 28, 2017 at 12:47:03AM +0530, Varun wrote:
I am not sure if this can actually make a difference, but is there any reason we don't just call set_item_equal unconditionally here? My concern is that f.get_curr_field() checks for Field* objects, while set_item_equal() call applies to Items (either Item_field or Item_direct_view_ref) What if there are two different Item objects that refer to the same field? (this looks like it should not happen but I am not 100% certain about this).
here, we have save_merged=true, that is, the old Item_equal will still be used. Is this ok that we call set_item_equal($new_equality) for its members? If an object is a participant in two Item_equal, which one should it point to? the "most specific" one? I'll try to ask Igor about this today. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog

Discussed this on the optimizer call, please find the notes below. On Wed, Nov 08, 2017 at 01:09:37PM +0300, Sergey Petrunia wrote:
There cannot be two Item_field objects that refer to the same field. According to Igor, an Item_equal object cannot have both $item= Item_field and an Item_*ref wich refers to the $item.
Asked, there is a concern about how item->item_equal is used. In the worst case, we will need to do a deep copy, that is, clone the Item_field (or Item_direct_view_ref) objects that participate in the multiple-equalities. (after writing this down, it struck me that if we create a new list of Item_field objects for addition into the Item_equal, will we need to adjust some pointers somewhere to point to the new objects? This seems to be more complex than the previous paragraph says) BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog
participants (1)
-
Sergey Petrunia