summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-28 11:25:59 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-28 11:25:59 +0200
commit0fdb17e6c3f50ae22eb97b6363bcbd8b0cd9e040 (patch)
treed158f4c46bac5acfa4ce9db59c7cad897dd7043b /sql/item_subselect.h
parent6dfe3fb2bb6903524966b6e51df05f317e714814 (diff)
parent79f852a069fb6ba5e18fd66ea2a24fa91c245c24 (diff)
downloadmariadb-git-0fdb17e6c3f50ae22eb97b6363bcbd8b0cd9e040.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 3c0b7bd6ade..c0746d08db7 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -750,7 +750,7 @@ public:
INDEXSUBQUERY_ENGINE, HASH_SJ_ENGINE,
ROWID_MERGE_ENGINE, TABLE_SCAN_ENGINE};
- subselect_engine(THD *thd_arg, Item_subselect *si,
+ subselect_engine(Item_subselect *si,
select_result_interceptor *res)
{
result= res;
@@ -758,7 +758,6 @@ public:
cmp_type= res_type= STRING_RESULT;
res_field_type= MYSQL_TYPE_VAR_STRING;
maybe_null= 0;
- set_thd(thd_arg);
}
virtual ~subselect_engine() {}; // to satisfy compiler
virtual void cleanup()= 0;
@@ -769,7 +768,7 @@ public:
*/
void set_thd(THD *thd_arg);
THD * get_thd() { return thd; }
- virtual int prepare()= 0;
+ virtual int prepare(THD *)= 0;
virtual void fix_length_and_dec(Item_cache** row)= 0;
/*
Execute the engine
@@ -824,11 +823,11 @@ class subselect_single_select_engine: public subselect_engine
st_select_lex *select_lex; /* corresponding select_lex */
JOIN * join; /* corresponding JOIN structure */
public:
- subselect_single_select_engine(THD *thd_arg, st_select_lex *select,
+ subselect_single_select_engine(st_select_lex *select,
select_result_interceptor *result,
Item_subselect *item);
void cleanup();
- int prepare();
+ int prepare(THD *thd);
void fix_length_and_dec(Item_cache** row);
int exec();
uint cols();
@@ -858,11 +857,11 @@ class subselect_union_engine: public subselect_engine
{
st_select_lex_unit *unit; /* corresponding unit structure */
public:
- subselect_union_engine(THD *thd_arg, st_select_lex_unit *u,
+ subselect_union_engine(st_select_lex_unit *u,
select_result_interceptor *result,
Item_subselect *item);
void cleanup();
- int prepare();
+ int prepare(THD *);
void fix_length_and_dec(Item_cache** row);
int exec();
uint cols();
@@ -915,11 +914,11 @@ public:
// constructor can assign THD because it will be called after JOIN::prepare
subselect_uniquesubquery_engine(THD *thd_arg, st_join_table *tab_arg,
Item_subselect *subs, Item *where)
- :subselect_engine(thd_arg, subs, 0), tab(tab_arg), cond(where)
+ :subselect_engine(subs, 0), tab(tab_arg), cond(where)
{}
~subselect_uniquesubquery_engine();
void cleanup();
- int prepare();
+ int prepare(THD *);
void fix_length_and_dec(Item_cache** row);
int exec();
uint cols() { return 1; }
@@ -1047,7 +1046,7 @@ public:
subselect_hash_sj_engine(THD *thd, Item_subselect *in_predicate,
subselect_single_select_engine *old_engine)
- : subselect_engine(thd, in_predicate, NULL),
+ : subselect_engine(in_predicate, NULL),
tmp_table(NULL), is_materialized(FALSE), materialize_engine(old_engine),
materialize_join(NULL), semi_join_conds(NULL), lookup_engine(NULL),
count_partial_match_columns(0), count_null_only_columns(0),
@@ -1057,7 +1056,7 @@ public:
bool init(List<Item> *tmp_columns, uint subquery_id);
void cleanup();
- int prepare();
+ int prepare(THD *);
int exec();
virtual void print(String *str, enum_query_type query_type);
uint cols()
@@ -1336,15 +1335,14 @@ protected:
protected:
virtual bool partial_match()= 0;
public:
- subselect_partial_match_engine(THD *thd_arg,
- subselect_uniquesubquery_engine *engine_arg,
+ subselect_partial_match_engine(subselect_uniquesubquery_engine *engine_arg,
TABLE *tmp_table_arg, Item_subselect *item_arg,
select_result_interceptor *result_arg,
List<Item> *equi_join_conds_arg,
bool has_covering_null_row_arg,
bool has_covering_null_columns_arg,
uint count_columns_with_nulls_arg);
- int prepare() { return 0; }
+ int prepare(THD *thd_arg) { set_thd(thd_arg); return 0; }
int exec();
void fix_length_and_dec(Item_cache**) {}
uint cols() { /* TODO: what is the correct value? */ return 1; }
@@ -1431,8 +1429,7 @@ protected:
bool exists_complementing_null_row(MY_BITMAP *keys_to_complement);
bool partial_match();
public:
- subselect_rowid_merge_engine(THD *thd_arg,
- subselect_uniquesubquery_engine *engine_arg,
+ subselect_rowid_merge_engine(subselect_uniquesubquery_engine *engine_arg,
TABLE *tmp_table_arg, uint merge_keys_count_arg,
bool has_covering_null_row_arg,
bool has_covering_null_columns_arg,
@@ -1440,7 +1437,7 @@ public:
Item_subselect *item_arg,
select_result_interceptor *result_arg,
List<Item> *equi_join_conds_arg)
- :subselect_partial_match_engine(thd_arg, engine_arg, tmp_table_arg,
+ :subselect_partial_match_engine(engine_arg, tmp_table_arg,
item_arg, result_arg, equi_join_conds_arg,
has_covering_null_row_arg,
has_covering_null_columns_arg,
@@ -1459,8 +1456,7 @@ class subselect_table_scan_engine: public subselect_partial_match_engine
protected:
bool partial_match();
public:
- subselect_table_scan_engine(THD *thd_arg,
- subselect_uniquesubquery_engine *engine_arg,
+ subselect_table_scan_engine(subselect_uniquesubquery_engine *engine_arg,
TABLE *tmp_table_arg, Item_subselect *item_arg,
select_result_interceptor *result_arg,
List<Item> *equi_join_conds_arg,