Please sign in to comment.
MDEV-6859: scalar subqueries in a comparison produced unexpected result
When one evaluates row-based comparison like (X, Y) = (A,B), one should first call bring_value() for the Item that returns row value. If you don't do that and just attempt to read values of X and Y, you get stale values. Semi-join/Materialization can take a row-based comparison apart and make ref access from it. In that case, we need to call bring_value() to get the index lookup components.
- Loading branch information...
Showing with 133 additions and 0 deletions.
|The following is needed when one makes ref (or eq_ref) access from row|
|comparisons: one must call row->bring_value() to get the new values.|
|if (tab && tab->bush_children)|
|TABLE_LIST *emb_sj_nest= tab->bush_children->start->emb_sj_nest;|
|/* TODO: Why don't we do "Late NULLs Filtering" here? */|
|if (cmp_buffer_with_ref(thd, table, table_ref) |||
|(table->status & (STATUS_GARBAGE | STATUS_NO_PARENT | STATUS_NULL_ROW)))|