diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2019-12-04 20:04:45 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2019-12-10 11:28:04 +0530 |
commit | 246e2ae12b514ed3010ffcf6473abbfd9f648340 (patch) | |
tree | 157e8281a3278bf6912cf22a80930cfc2b61bbdc /sql/opt_subselect.cc | |
parent | e5e5877740f248de848219ee3a1d2881cd5c5b82 (diff) | |
download | mariadb-git-246e2ae12b514ed3010ffcf6473abbfd9f648340.tar.gz |
MDEV-20900: IN predicate to IN subquery conversion causes performance regression
Disable the IN predicate to IN subquery conversion when the types on the left and
right hand side of the IN predicate are not of comparable type.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index a4ee27950be..50f7efd6d65 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -829,7 +829,12 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs) in_subs->types_allow_materialization= FALSE; // Assign default values in_subs->sjm_scan_allowed= FALSE; - + + /* + The checks here must be kept in sync with the one in + Item_func_in::in_predicate_to_in_subs_transformer(). + */ + bool all_are_fields= TRUE; uint32 total_key_length = 0; for (uint i= 0; i < elements; i++) |