diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-21 11:33:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-21 11:33:59 +0300 |
commit | 394784095eeedb3a2915249fe14a9d2e1f91a23a (patch) | |
tree | 0a2e7ad98bfa382744d87c6af6eb91f4bfc3858d /sql/item_subselect.cc | |
parent | d7189fbcb4dadf23d615a5f3a26aba1d4e37178f (diff) | |
parent | 4730314a70119ae5857edffe2d1bec86960ef22b (diff) | |
download | mariadb-git-394784095eeedb3a2915249fe14a9d2e1f91a23a.tar.gz |
Merge 10.3 into 10.4
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 e12deb22797..d19e89ad6af 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2796,6 +2796,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 @@ -2806,7 +2808,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; |