summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorEugene Kosov <eugene.kosov@mariadb.com>2020-07-06 22:02:16 +0300
committerEugene Kosov <eugene.kosov@mariadb.com>2020-07-06 22:03:58 +0300
commitee5841376aa4c1cbd9903a920310dc778d9a2d28 (patch)
treeb7ebb9b2a2a76eaefa8eee4f2251870cfaf19412 /sql/item_subselect.h
parent846174c5ba832fe7c7282a575c104cb7d8497b3d (diff)
downloadmariadb-git-ee5841376aa4c1cbd9903a920310dc778d9a2d28.tar.gz
fix clang compilation
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h149
1 files changed, 77 insertions, 72 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index e2c82554b73..b4b278083fc 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -163,7 +163,7 @@ public:
select_result_interceptor *result);
~Item_subselect();
- void cleanup();
+ void cleanup() override;
virtual void reset()
{
eliminated= FALSE;
@@ -173,22 +173,23 @@ public:
Set the subquery result to a default value consistent with the semantics of
the result row produced for queries with implicit grouping.
*/
- void no_rows_in_result()= 0;
+ void no_rows_in_result() override= 0;
virtual bool select_transformer(JOIN *join);
bool assigned() { return value_assigned; }
void assigned(bool a) { value_assigned= a; }
- enum Type type() const;
- bool is_null()
+ enum Type type() const override;
+ bool is_null() override
{
update_null_value();
return null_value;
}
- bool fix_fields(THD *thd, Item **ref);
- bool with_subquery() const { DBUG_ASSERT(fixed); return true; }
- bool with_sum_func() const { return m_with_sum_func; }
- With_sum_func_cache* get_with_sum_func_cache() { return this; }
+ bool fix_fields(THD *thd, Item **ref) override;
+ bool with_subquery() const override { DBUG_ASSERT(fixed); return true; }
+ bool with_sum_func() const override { return m_with_sum_func; }
+ With_sum_func_cache* get_with_sum_func_cache() override { return this; }
bool mark_as_dependent(THD *thd, st_select_lex *select, Item *item);
- void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
+ void fix_after_pullout(st_select_lex *new_parent, Item **ref,
+ bool merge) override;
void recalc_used_tables(st_select_lex *new_parent, bool after_pullout);
virtual bool exec();
/*
@@ -202,13 +203,13 @@ public:
forced_const= TRUE;
}
virtual bool fix_length_and_dec();
- table_map used_tables() const;
- table_map not_null_tables() const { return 0; }
- bool const_item() const;
+ table_map used_tables() const override;
+ table_map not_null_tables() const override { return 0; }
+ bool const_item() const override;
inline table_map get_used_tables_cache() { return used_tables_cache; }
- Item *get_tmp_table_item(THD *thd);
- void update_used_tables();
- virtual void print(String *str, enum_query_type query_type);
+ Item *get_tmp_table_item(THD *thd) override;
+ void update_used_tables() override;
+ void print(String *str, enum_query_type query_type) override;
virtual bool have_guarded_conds() { return FALSE; }
bool change_engine(subselect_engine *eng)
{
@@ -223,7 +224,7 @@ public:
*/
bool is_evaluated() const;
bool is_uncacheable() const;
- bool is_expensive();
+ bool is_expensive() override;
/*
Used by max/min subquery to initialize value presence registration
@@ -231,13 +232,13 @@ public:
*/
virtual void reset_value_registration() {}
enum_parsing_place place() { return parsing_place; }
- bool walk(Item_processor processor, bool walk_subquery, void *arg);
- bool unknown_splocal_processor(void *arg);
- bool mark_as_eliminated_processor(void *arg);
- bool eliminate_subselect_processor(void *arg);
- bool set_fake_select_as_master_processor(void *arg);
- bool enumerate_field_refs_processor(void *arg);
- bool check_vcol_func_processor(void *arg)
+ bool walk(Item_processor processor, bool walk_subquery, void *arg) override;
+ bool unknown_splocal_processor(void *arg) override;
+ bool mark_as_eliminated_processor(void *arg) override;
+ bool eliminate_subselect_processor(void *arg) override;
+ bool set_fake_select_as_master_processor(void *arg) override;
+ bool enumerate_field_refs_processor(void *arg) override;
+ bool check_vcol_func_processor(void *arg) override
{
return mark_unsupported_function("select ...", arg, VCOL_IMPOSSIBLE);
}
@@ -250,27 +251,27 @@ public:
@retval TRUE if the predicate is expensive
@retval FALSE otherwise
*/
- bool is_expensive_processor(void *arg) { return is_expensive(); }
+ bool is_expensive_processor(void *arg) override { return is_expensive(); }
/**
Get the SELECT_LEX structure associated with this Item.
@return the SELECT_LEX structure associated with this Item
*/
st_select_lex* get_select_lex();
- virtual bool expr_cache_is_needed(THD *);
- virtual void get_cache_parameters(List<Item> &parameters);
- virtual bool is_subquery_processor (void *opt_arg) { return 1; }
- bool exists2in_processor(void *opt_arg) { return 0; }
- bool limit_index_condition_pushdown_processor(void *opt_arg)
+ bool expr_cache_is_needed(THD *) override;
+ void get_cache_parameters(List<Item> &parameters) override;
+ bool is_subquery_processor (void *opt_arg) override { return 1; }
+ bool exists2in_processor(void *opt_arg) override { return 0; }
+ bool limit_index_condition_pushdown_processor(void *opt_arg) override
{
return TRUE;
}
void register_as_with_rec_ref(With_element *with_elem);
void init_expr_cache_tracker(THD *thd);
-
- Item* build_clone(THD *thd) { return 0; }
- Item* get_copy(THD *thd) { return 0; }
+
+ Item* build_clone(THD *thd) override { return 0; }
+ Item* get_copy(THD *thd) override { return 0; }
bool wrap_tvc_into_select(THD *thd, st_select_lex *tvc_sl);
@@ -393,37 +394,40 @@ public:
emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0)
{}
- subs_type substype() { return EXISTS_SUBS; }
- void reset()
+ subs_type substype() override { return EXISTS_SUBS; }
+ void reset() override
{
eliminated= FALSE;
value= 0;
}
- void no_rows_in_result();
+ void no_rows_in_result() override;
- const Type_handler *type_handler() const { return &type_handler_bool; }
- longlong val_int();
- double val_real();
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *);
- bool val_bool();
- bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
+ const Type_handler *type_handler() const override
+ {
+ return &type_handler_bool;
+ }
+ longlong val_int() override;
+ double val_real() override;
+ String *val_str(String*) override;
+ my_decimal *val_decimal(my_decimal *) override;
+ bool val_bool() override;
+ bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{ return get_date_from_int(thd, ltime, fuzzydate); }
- bool fix_fields(THD *thd, Item **ref);
- bool fix_length_and_dec();
- void print(String *str, enum_query_type query_type);
- bool select_transformer(JOIN *join);
- void top_level_item() { abort_on_null=1; }
+ bool fix_fields(THD *thd, Item **ref) override;
+ bool fix_length_and_dec() override;
+ void print(String *str, enum_query_type query_type) override;
+ bool select_transformer(JOIN *join) override;
+ void top_level_item() override { abort_on_null=1; }
bool is_top_level_item() const override { return abort_on_null; }
- bool exists2in_processor(void *opt_arg);
+ bool exists2in_processor(void *opt_arg) override;
- Item* expr_cache_insert_transformer(THD *thd, uchar *unused);
+ Item* expr_cache_insert_transformer(THD *thd, uchar *unused) override;
- void mark_as_condition_AND_part(TABLE_LIST *embedding)
+ void mark_as_condition_AND_part(TABLE_LIST *embedding) override
{
emb_on_expr_nest= embedding;
}
- virtual void under_not(Item_func_not *upper) { upper_not= upper; };
+ void under_not(Item_func_not *upper) override { upper_not= upper; };
void set_exists_transformed() { exists_transformed= TRUE; }
@@ -601,7 +605,7 @@ public:
if ( pushed_cond_guards)
pushed_cond_guards[i]= v;
}
- bool have_guarded_conds() { return MY_TEST(pushed_cond_guards); }
+ bool have_guarded_conds() override { return MY_TEST(pushed_cond_guards); }
Item_func_not_all *upper_item; // point on NOT/NOP before ALL/SOME subquery
@@ -611,41 +615,42 @@ public:
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) {}
- void cleanup();
- subs_type substype() { return IN_SUBS; }
- void reset()
+ void cleanup() override;
+ subs_type substype() override { return IN_SUBS; }
+ void reset() override
{
eliminated= FALSE;
value= 0;
null_value= 0;
was_null= 0;
}
- bool select_transformer(JOIN *join);
+ bool select_transformer(JOIN *join) override;
bool create_in_to_exists_cond(JOIN *join_arg);
bool inject_in_to_exists_cond(JOIN *join_arg);
- virtual bool exec();
- longlong val_int();
- double val_real();
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *);
- bool val_bool();
+ bool exec() override;
+ longlong val_int() override;
+ double val_real() override;
+ String *val_str(String*) override;
+ my_decimal *val_decimal(my_decimal *) override;
+ bool val_bool() override;
bool test_limit(st_select_lex_unit *unit);
- void print(String *str, enum_query_type query_type);
- enum precedence precedence() const { return CMP_PRECEDENCE; }
- bool fix_fields(THD *thd, Item **ref);
- bool fix_length_and_dec();
- void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
- bool const_item() const
+ void print(String *str, enum_query_type query_type) override;
+ enum precedence precedence() const override { return CMP_PRECEDENCE; }
+ bool fix_fields(THD *thd, Item **ref) override;
+ bool fix_length_and_dec() override;
+ void fix_after_pullout(st_select_lex *new_parent, Item **ref,
+ bool merge) override;
+ bool const_item() const override
{
return Item_subselect::const_item() && left_expr->const_item();
}
- void update_used_tables();
+ void update_used_tables() override;
bool setup_mat_engine();
bool init_left_expr_cache();
/* Inform 'this' that it was computed, and contains a valid result. */
void set_first_execution() { if (first_execution) first_execution= FALSE; }
- bool expr_cache_is_needed(THD *thd);
+ bool expr_cache_is_needed(THD *thd) override;
inline bool left_expr_has_null();
void disable_cond_guard_for_const_null_left_expr(int i)
@@ -737,13 +742,13 @@ public:
DBUG_VOID_RETURN;
}
- bool walk(Item_processor processor, bool walk_subquery, void *arg)
+ bool walk(Item_processor processor, bool walk_subquery, void *arg) override
{
return left_expr->walk(processor, walk_subquery, arg) ||
Item_subselect::walk(processor, walk_subquery, arg);
}
- bool exists2in_processor(void *opt_arg __attribute__((unused)))
+ bool exists2in_processor(void *opt_arg __attribute__((unused))) override
{
return 0;
};