mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-10389: Query returns different results on a debug vs non-debug build
The problem was caused by a merged semi-join, which contained a non-merged semi-join, which used references to the top-level query in the left_expr. When moving non-merged semi-join from the subquery to its parent, do not forget to call fix_after_pullout for its Item_subselect. We need to do that specifically, because non-merged semi-joins do not have their IN-equality in the WHERE clause at this stage.
This commit is contained in:
@@ -1558,7 +1558,12 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
|
||||
{
|
||||
tl->set_tablenr(table_no);
|
||||
if (tl->is_jtbm())
|
||||
{
|
||||
tl->jtbm_table_no= table_no;
|
||||
Item *dummy= tl->jtbm_subselect;
|
||||
tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy);
|
||||
DBUG_ASSERT(dummy == tl->jtbm_subselect);
|
||||
}
|
||||
SELECT_LEX *old_sl= tl->select_lex;
|
||||
tl->select_lex= parent_join->select_lex;
|
||||
for (TABLE_LIST *emb= tl->embedding;
|
||||
|
Reference in New Issue
Block a user