diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-21 15:33:50 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-21 15:33:50 +0300 |
commit | 620c55e708b9ea94ef8ba309267a6f2f32ed8104 (patch) | |
tree | 434f8bbb36626d16e8438b82da1618bd8313f6a2 /sql/item_subselect.cc | |
parent | fdec842fd7f82b6ed9aec54f82ac50b5eea925b3 (diff) | |
parent | aec856073df12e95b68667587bfd8e469b60e7d4 (diff) | |
download | mariadb-git-620c55e708b9ea94ef8ba309267a6f2f32ed8104.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 7412c517262..cf02e401111 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2832,6 +2832,8 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg) } where_item= and_items(thd, join_arg->conds, where_item); + + /* This is the fix_fields() call mentioned in the comment above */ if (where_item->fix_fields_if_needed(thd, 0)) DBUG_RETURN(true); // TIMOUR TODO: call optimize_cond() for the new where clause @@ -2842,7 +2844,10 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg) /* Attach back the list of multiple equalities to the new top-level AND. */ if (and_args && join_arg->cond_equal) { - /* The argument list of the top-level AND may change after fix fields. */ + /* + The fix_fields() call above may have changed the argument list, so + fetch it again: + */ and_args= ((Item_cond*) join_arg->conds)->argument_list(); ((Item_cond_and *) (join_arg->conds))->m_cond_equal= *join_arg->cond_equal; |