On Sat, Feb 13, 2021 at 03:23:50PM +0300, Sergey Petrunia wrote:
/* Substituting WHERE clause's field items with sort-nest's field items */ if (conds) { conds= conds->transform(thd, &Item::replace_with_nest_items, TRUE, (uchar *) nest_info); conds->update_used_tables(); }
As far as I understand, the items from the WHERE clause can be attached both outside and inside the nest.
Moreover, if the WHERE clause has this form
(condA(t1) AND condB(t2) OR (condC(t1) AND condD(t2))
and the join order is t1,t2, then make_cond_for_table() will attach condA(t1) to both t1 and t2.
How is this handled?
Ah, I've found extract_condition_for_the_nest() function. This is now cleara. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://petrunia.net