Commit d285eadf authored by Yuchen Pei's avatar Yuchen Pei

MDEV-22534 Factor out common parts between the two transformations

parent 82b05c0b
This diff is collapsed.
......@@ -365,6 +365,13 @@ class Item_maxmin_subselect :public Item_singlerow_subselect
void no_rows_in_result() override;
};
typedef struct st_eq_field_outer
{
Item **eq_ref;
Item_ident *local_field;
Item *outer_exp;
} EQ_FIELD_OUTER;
/* exists subselect */
class Item_exists_subselect :public Item_subselect
......@@ -375,7 +382,9 @@ class Item_exists_subselect :public Item_subselect
void init_length_and_dec();
bool select_prepare_to_be_in();
bool exists2in_prepare(THD *thd, Dynamic_array<EQ_FIELD_OUTER> &eqs, bool &will_be_correlated);
bool exists2in_create_or_update_in(THD *thd, const Dynamic_array<EQ_FIELD_OUTER> &eqs, Item** left_exp_ref);
bool exists2in_and_is_not_nulls(uint offset, Item *left_exp, Item **left_exp_ref);
public:
/*
Used by subquery optimizations to keep track about in which clause this
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment