summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-11-27 22:06:54 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-11-30 17:16:43 +0530
commitb4379df5b485143209c35b9f6f07b00049c8d455 (patch)
tree8f34d436dfaaa584cc416cf703c6bbacd50af385 /sql/item_subselect.h
parentf3b10354a97a0815d36abbfd25a5f10489a3eaab (diff)
downloadmariadb-git-b4379df5b485143209c35b9f6f07b00049c8d455.tar.gz
MDEV-21265: IN predicate conversion to IN subquery should be allowed for a broader set of datatype comparison
Allow materialization strategy when collations on the inner and outer sides of an IN subquery are the same and the character set of the inner side is a proper subset of the character set on the outer side. This allows conversion from utf8mb3 to utf8mb4 as the former is a subset of the later. This is only allowed when IN predicate is converted to an IN subquery Backported part of the patch (d6a00d9b18f) of MDEV-17905.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 1cea7291c9e..fdc39f1f05e 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -601,12 +601,18 @@ public:
Item_func_not_all *upper_item; // point on NOT/NOP before ALL/SOME subquery
+ /*
+ SET to TRUE if IN subquery is converted from an IN predicate
+ */
+ bool converted_from_in_predicate;
+
Item_in_subselect(THD *thd_arg, Item * left_expr, st_select_lex *select_lex);
Item_in_subselect(THD *thd_arg):
Item_exists_subselect(thd_arg), left_expr_cache(0), first_execution(TRUE),
in_strategy(SUBS_NOT_TRANSFORMED),
pushed_cond_guards(NULL), func(NULL), do_not_convert_to_sj(FALSE),
- is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), upper_item(0) {}
+ is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), upper_item(0),
+ converted_from_in_predicate(FALSE) {}
void cleanup();
subs_type substype() { return IN_SUBS; }
void reset()