summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-01 19:51:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-01 19:51:14 +0200
commit589cf8dbf3accf57673d7e2f7a4435f7eaf33565 (patch)
treeaa38a67d10f71fc781188341857e34d437fa9199 /sql/opt_subselect.cc
parenta3531775b1efe06e2439a0c8ab668a2b69c859eb (diff)
parente30a05f4540b581df2e7d98bd7e812aeff603744 (diff)
downloadmariadb-git-589cf8dbf3accf57673d7e2f7a4435f7eaf33565.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 62af68262ba..f7349e7a1bf 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -868,6 +868,7 @@ bool subquery_types_allow_materialization(THD* thd, Item_in_subselect *in_subs)
bool all_are_fields= TRUE;
uint32 total_key_length = 0;
+ bool converted_from_in_predicate= in_subs->converted_from_in_predicate;
for (uint i= 0; i < elements; i++)
{
Item *outer= in_subs->left_expr->element_index(i);
@@ -875,8 +876,11 @@ bool subquery_types_allow_materialization(THD* thd, Item_in_subselect *in_subs)
all_are_fields &= (outer->real_item()->type() == Item::FIELD_ITEM &&
inner->real_item()->type() == Item::FIELD_ITEM);
total_key_length += inner->max_length;
- if (!inner->type_handler()->subquery_type_allows_materialization(inner,
- outer))
+ if (!inner->
+ type_handler()->
+ subquery_type_allows_materialization(inner,
+ outer,
+ converted_from_in_predicate))
{
trace_transform.add("possible", false);
trace_transform.add("cause", "types mismatch");