|
|
|
@ -60,7 +60,7 @@ char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg) |
|
|
|
return (tmp > UINT_MAX32) ? (uint32) UINT_MAX32 : (uint32) tmp; |
|
|
|
} |
|
|
|
|
|
|
|
bool mark_unsupported_function(const char *where, uchar *store, uint result); |
|
|
|
bool mark_unsupported_function(const char *where, void *store, uint result); |
|
|
|
|
|
|
|
|
|
|
|
/* Bits for the split_sum_func() function */ |
|
|
|
@ -504,7 +504,7 @@ struct st_dyncall_create_def |
|
|
|
typedef struct st_dyncall_create_def DYNCALL_CREATE_DEF; |
|
|
|
|
|
|
|
|
|
|
|
typedef bool (Item::*Item_processor) (uchar *arg); |
|
|
|
typedef bool (Item::*Item_processor) (void *arg); |
|
|
|
/* |
|
|
|
Analyzer function |
|
|
|
SYNOPSIS |
|
|
|
@ -1402,12 +1402,7 @@ public: |
|
|
|
&my_charset_bin; |
|
|
|
}; |
|
|
|
|
|
|
|
virtual bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
{ |
|
|
|
return (this->*processor)(arg); |
|
|
|
} |
|
|
|
|
|
|
|
virtual bool walk_top_and(Item_processor processor, uchar *arg) |
|
|
|
virtual bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
return (this->*processor)(arg); |
|
|
|
} |
|
|
|
@ -1451,34 +1446,34 @@ public: |
|
|
|
this function and set the int_arg to maximum of the input data |
|
|
|
and their own version info. |
|
|
|
*/ |
|
|
|
virtual bool intro_version(uchar *int_arg) { return 0; } |
|
|
|
|
|
|
|
virtual bool remove_dependence_processor(uchar * arg) { return 0; } |
|
|
|
virtual bool cleanup_processor(uchar *arg); |
|
|
|
virtual bool collect_item_field_processor(uchar * arg) { return 0; } |
|
|
|
virtual bool add_field_to_set_processor(uchar * arg) { return 0; } |
|
|
|
virtual bool find_item_in_field_list_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool find_item_processor(uchar *arg); |
|
|
|
virtual bool change_context_processor(uchar *context) { return 0; } |
|
|
|
virtual bool reset_query_id_processor(uchar *query_id_arg) { return 0; } |
|
|
|
virtual bool is_expensive_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool register_field_in_read_map(uchar *arg) { return 0; } |
|
|
|
virtual bool register_field_in_write_map(uchar *arg) { return 0; } |
|
|
|
virtual bool enumerate_field_refs_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool mark_as_eliminated_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool eliminate_subselect_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool set_fake_select_as_master_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool update_table_bitmaps_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool view_used_tables_processor(uchar *arg) { return 0; } |
|
|
|
virtual bool eval_not_null_tables(uchar *opt_arg) { return 0; } |
|
|
|
virtual bool is_subquery_processor (uchar *opt_arg) { return 0; } |
|
|
|
virtual bool count_sargable_conds(uchar *arg) { return 0; } |
|
|
|
virtual bool limit_index_condition_pushdown_processor(uchar *opt_arg) |
|
|
|
virtual bool intro_version(void *int_arg) { return 0; } |
|
|
|
|
|
|
|
virtual bool remove_dependence_processor(void * arg) { return 0; } |
|
|
|
virtual bool cleanup_processor(void *arg); |
|
|
|
virtual bool collect_item_field_processor(void * arg) { return 0; } |
|
|
|
virtual bool add_field_to_set_processor(void * arg) { return 0; } |
|
|
|
virtual bool find_item_in_field_list_processor(void *arg) { return 0; } |
|
|
|
virtual bool find_item_processor(void *arg); |
|
|
|
virtual bool change_context_processor(void *context) { return 0; } |
|
|
|
virtual bool reset_query_id_processor(void *query_id_arg) { return 0; } |
|
|
|
virtual bool is_expensive_processor(void *arg) { return 0; } |
|
|
|
virtual bool register_field_in_read_map(void *arg) { return 0; } |
|
|
|
virtual bool register_field_in_write_map(void *arg) { return 0; } |
|
|
|
virtual bool enumerate_field_refs_processor(void *arg) { return 0; } |
|
|
|
virtual bool mark_as_eliminated_processor(void *arg) { return 0; } |
|
|
|
virtual bool eliminate_subselect_processor(void *arg) { return 0; } |
|
|
|
virtual bool set_fake_select_as_master_processor(void *arg) { return 0; } |
|
|
|
virtual bool update_table_bitmaps_processor(void *arg) { return 0; } |
|
|
|
virtual bool view_used_tables_processor(void *arg) { return 0; } |
|
|
|
virtual bool eval_not_null_tables(void *opt_arg) { return 0; } |
|
|
|
virtual bool is_subquery_processor (void *opt_arg) { return 0; } |
|
|
|
virtual bool count_sargable_conds(void *arg) { return 0; } |
|
|
|
virtual bool limit_index_condition_pushdown_processor(void *opt_arg) |
|
|
|
{ |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
virtual bool exists2in_processor(uchar *opt_arg) { return 0; } |
|
|
|
virtual bool find_selective_predicates_list_processor(uchar *opt_arg) |
|
|
|
virtual bool exists2in_processor(void *opt_arg) { return 0; } |
|
|
|
virtual bool find_selective_predicates_list_processor(void *opt_arg) |
|
|
|
{ return 0; } |
|
|
|
|
|
|
|
/* To call bool function for all arguments */ |
|
|
|
@ -1487,21 +1482,12 @@ public: |
|
|
|
Item *original_func_item; |
|
|
|
void (Item::*bool_function)(); |
|
|
|
}; |
|
|
|
bool call_bool_func_processor(uchar *org_item) |
|
|
|
{ |
|
|
|
bool_func_call_args *info= (bool_func_call_args*) org_item; |
|
|
|
/* Avoid recursion, as walk also calls for original item */ |
|
|
|
if (info->original_func_item != this) |
|
|
|
(this->*(info->bool_function))(); |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
The next function differs from the previous one that a bitmap to be updated |
|
|
|
is passed as uchar *arg. |
|
|
|
*/ |
|
|
|
virtual bool register_field_in_bitmap(uchar *arg) { return 0; } |
|
|
|
virtual bool register_field_in_bitmap(void *arg) { return 0; } |
|
|
|
|
|
|
|
bool cache_const_expr_analyzer(uchar **arg); |
|
|
|
Item* cache_const_expr_transformer(THD *thd, uchar *arg); |
|
|
|
@ -1557,7 +1543,7 @@ public: |
|
|
|
assumes that there are no multi-byte collations amongst the partition |
|
|
|
fields. |
|
|
|
*/ |
|
|
|
virtual bool check_partition_func_processor(uchar *bool_arg) { return TRUE;} |
|
|
|
virtual bool check_partition_func_processor(void *bool_arg) { return TRUE;} |
|
|
|
/* |
|
|
|
@brief |
|
|
|
Processor used to mark virtual columns used in partitioning expression |
|
|
|
@ -1568,7 +1554,7 @@ public: |
|
|
|
@retval |
|
|
|
FALSE always |
|
|
|
*/ |
|
|
|
virtual bool vcol_in_partition_func_processor(uchar *arg) |
|
|
|
virtual bool vcol_in_partition_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
@ -1601,12 +1587,12 @@ public: |
|
|
|
uint errors; /* Bits of possible errors */ |
|
|
|
const char *name; /* Not supported function */ |
|
|
|
}; |
|
|
|
virtual bool check_vcol_func_processor(uchar *arg) |
|
|
|
virtual bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function(full_name(), arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
|
|
|
|
virtual bool check_field_expression_processor(uchar *arg) { return FALSE; } |
|
|
|
virtual bool check_field_expression_processor(void *arg) { return FALSE; } |
|
|
|
|
|
|
|
/* arg points to REPLACE_EQUAL_FIELD_ARG object */ |
|
|
|
virtual Item *replace_equal_field(THD *thd, uchar *arg) { return this; } |
|
|
|
@ -1615,7 +1601,7 @@ public: |
|
|
|
for date functions. Also used by partitioning code to reject |
|
|
|
timezone-dependent expressions in a (sub)partitioning function. |
|
|
|
*/ |
|
|
|
virtual bool check_valid_arguments_processor(uchar *bool_arg) |
|
|
|
virtual bool check_valid_arguments_processor(void *bool_arg) |
|
|
|
{ |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
@ -1631,7 +1617,7 @@ public: |
|
|
|
/** |
|
|
|
Collect outer references |
|
|
|
*/ |
|
|
|
virtual bool collect_outer_ref_processor(uchar *arg) {return FALSE; } |
|
|
|
virtual bool collect_outer_ref_processor(void *arg) {return FALSE; } |
|
|
|
|
|
|
|
/** |
|
|
|
Find a function of a given type |
|
|
|
@ -1645,14 +1631,14 @@ public: |
|
|
|
This function can be used (together with Item::walk()) to find functions |
|
|
|
in an item tree fragment. |
|
|
|
*/ |
|
|
|
virtual bool find_function_processor (uchar *arg) |
|
|
|
virtual bool find_function_processor (void *arg) |
|
|
|
{ |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
virtual bool check_inner_refs_processor(uchar *arg) { return FALSE; } |
|
|
|
virtual bool check_inner_refs_processor(void *arg) { return FALSE; } |
|
|
|
|
|
|
|
virtual bool switch_to_nullable_fields_processor(uchar *arg) { return FALSE; } |
|
|
|
virtual bool switch_to_nullable_fields_processor(void *arg) { return FALSE; } |
|
|
|
|
|
|
|
/* |
|
|
|
For SP local variable returns pointer to Item representing its |
|
|
|
@ -1774,7 +1760,7 @@ public: |
|
|
|
virtual bool is_expensive() |
|
|
|
{ |
|
|
|
if (is_expensive_cache < 0) |
|
|
|
is_expensive_cache= walk(&Item::is_expensive_processor, 0, (uchar*)0); |
|
|
|
is_expensive_cache= walk(&Item::is_expensive_processor, 0, NULL); |
|
|
|
return MY_TEST(is_expensive_cache); |
|
|
|
} |
|
|
|
virtual Field::geometry_type get_geometry_type() const |
|
|
|
@ -1825,7 +1811,7 @@ public: |
|
|
|
table_map view_used_tables(TABLE_LIST *view) |
|
|
|
{ |
|
|
|
view->view_used_tables= 0; |
|
|
|
walk(&Item::view_used_tables_processor, 0, (uchar *) view); |
|
|
|
walk(&Item::view_used_tables_processor, 0, view); |
|
|
|
return view->view_used_tables; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1872,7 +1858,7 @@ bool cmp_items(Item *a, Item *b); |
|
|
|
} |
|
|
|
|
|
|
|
My_enumerator enumerator; |
|
|
|
item->walk(Item::enumerate_field_refs_processor, ...,(uchar*)&enumerator); |
|
|
|
item->walk(Item::enumerate_field_refs_processor, ...,&enumerator); |
|
|
|
|
|
|
|
This is similar to Visitor pattern. |
|
|
|
*/ |
|
|
|
@ -1984,7 +1970,7 @@ public: |
|
|
|
Item_basic_constant(THD *thd): Item_basic_value(thd), used_table_map(0) {}; |
|
|
|
void set_used_tables(table_map map) { used_table_map= map; } |
|
|
|
table_map used_tables() const { return used_table_map; } |
|
|
|
bool check_vcol_func_processor(uchar *arg) { return FALSE;} |
|
|
|
bool check_vcol_func_processor(void *arg) { return FALSE;} |
|
|
|
/* to prevent drop fixed flag (no need parent cleanup call) */ |
|
|
|
void cleanup() |
|
|
|
{ |
|
|
|
@ -2251,7 +2237,7 @@ public: |
|
|
|
{ |
|
|
|
return value_item->send(protocol, str); |
|
|
|
} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("name_const", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -2262,7 +2248,7 @@ class Item_num: public Item_basic_constant |
|
|
|
public: |
|
|
|
Item_num(THD *thd): Item_basic_constant(thd) { collation.set_numeric(); } |
|
|
|
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs); |
|
|
|
bool check_partition_func_processor(uchar *int_arg) { return FALSE;} |
|
|
|
bool check_partition_func_processor(void *int_arg) { return FALSE;} |
|
|
|
}; |
|
|
|
|
|
|
|
#define NO_CACHED_FIELD_INDEX ((uint)(-1)) |
|
|
|
@ -2294,7 +2280,7 @@ public: |
|
|
|
save_in_field(result_field, no_conversions); |
|
|
|
} |
|
|
|
void cleanup(); |
|
|
|
bool check_vcol_func_processor(uchar *arg) { return FALSE;} |
|
|
|
bool check_vcol_func_processor(void *arg) { return FALSE;} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -2351,14 +2337,14 @@ public: |
|
|
|
const char *full_name() const; |
|
|
|
void cleanup(); |
|
|
|
st_select_lex *get_depended_from() const; |
|
|
|
bool remove_dependence_processor(uchar * arg); |
|
|
|
bool remove_dependence_processor(void * arg); |
|
|
|
virtual void print(String *str, enum_query_type query_type); |
|
|
|
virtual bool change_context_processor(uchar *cntx) |
|
|
|
virtual bool change_context_processor(void *cntx) |
|
|
|
{ context= (Name_resolution_context *)cntx; return FALSE; } |
|
|
|
/** |
|
|
|
Collect outer references |
|
|
|
*/ |
|
|
|
virtual bool collect_outer_ref_processor(uchar *arg); |
|
|
|
virtual bool collect_outer_ref_processor(void *arg); |
|
|
|
friend bool insert_fields(THD *thd, Name_resolution_context *context, |
|
|
|
const char *db_name, |
|
|
|
const char *table_name, List_iterator<Item> *it, |
|
|
|
@ -2513,18 +2499,18 @@ public: |
|
|
|
void set_result_field(Field *field_arg) {} |
|
|
|
void save_in_result_field(bool no_conversions) { } |
|
|
|
Item *get_tmp_table_item(THD *thd); |
|
|
|
bool collect_item_field_processor(uchar * arg); |
|
|
|
bool add_field_to_set_processor(uchar * arg); |
|
|
|
bool find_item_in_field_list_processor(uchar *arg); |
|
|
|
bool register_field_in_read_map(uchar *arg); |
|
|
|
bool register_field_in_write_map(uchar *arg); |
|
|
|
bool register_field_in_bitmap(uchar *arg); |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool vcol_in_partition_func_processor(uchar *bool_arg); |
|
|
|
bool check_field_expression_processor(uchar *arg); |
|
|
|
bool enumerate_field_refs_processor(uchar *arg); |
|
|
|
bool update_table_bitmaps_processor(uchar *arg); |
|
|
|
bool switch_to_nullable_fields_processor(uchar *arg); |
|
|
|
bool collect_item_field_processor(void * arg); |
|
|
|
bool add_field_to_set_processor(void * arg); |
|
|
|
bool find_item_in_field_list_processor(void *arg); |
|
|
|
bool register_field_in_read_map(void *arg); |
|
|
|
bool register_field_in_write_map(void *arg); |
|
|
|
bool register_field_in_bitmap(void *arg); |
|
|
|
bool check_partition_func_processor(void *int_arg) {return FALSE;} |
|
|
|
bool vcol_in_partition_func_processor(void *bool_arg); |
|
|
|
bool check_field_expression_processor(void *arg); |
|
|
|
bool enumerate_field_refs_processor(void *arg); |
|
|
|
bool update_table_bitmaps_processor(void *arg); |
|
|
|
bool switch_to_nullable_fields_processor(void *arg); |
|
|
|
void cleanup(); |
|
|
|
Item_equal *get_item_equal() { return item_equal; } |
|
|
|
void set_item_equal(Item_equal *item_eq) { item_equal= item_eq; } |
|
|
|
@ -2627,7 +2613,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs); |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool check_partition_func_processor(void *int_arg) {return FALSE;} |
|
|
|
}; |
|
|
|
|
|
|
|
class Item_null_result :public Item_null |
|
|
|
@ -2640,8 +2626,8 @@ public: |
|
|
|
{ |
|
|
|
save_in_field(result_field, no_conversions); |
|
|
|
} |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_partition_func_processor(void *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function(full_name(), arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -2788,7 +2774,7 @@ public: |
|
|
|
{ return this; } |
|
|
|
|
|
|
|
bool append_for_log(THD *thd, String *str); |
|
|
|
bool check_vcol_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool check_vcol_func_processor(void *int_arg) {return FALSE;} |
|
|
|
private: |
|
|
|
virtual bool set_value(THD *thd, sp_rcontext *ctx, Item **it); |
|
|
|
|
|
|
|
@ -3079,7 +3065,7 @@ public: |
|
|
|
max_length= str_value.numchars() * collation.collation->mbmaxlen; |
|
|
|
} |
|
|
|
virtual void print(String *str, enum_query_type query_type); |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool check_partition_func_processor(void *int_arg) {return FALSE;} |
|
|
|
|
|
|
|
/** |
|
|
|
Return TRUE if character-set-introducer was explicitly specified in the |
|
|
|
@ -3210,8 +3196,8 @@ public: |
|
|
|
str->append(func_name); |
|
|
|
} |
|
|
|
|
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_partition_func_processor(void *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function(func_name, arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -3226,7 +3212,7 @@ public: |
|
|
|
CHARSET_INFO *cs= NULL): |
|
|
|
Item_string(thd, name_arg, length, cs) |
|
|
|
{} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("safe_string", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -3315,7 +3301,7 @@ public: |
|
|
|
{ |
|
|
|
return const_charset_converter(thd, tocs, true); |
|
|
|
} |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool check_partition_func_processor(void *int_arg) {return FALSE;} |
|
|
|
bool basic_const_item() const { return 1; } |
|
|
|
bool eq(const Item *item, bool binary_cmp) const |
|
|
|
{ |
|
|
|
@ -3443,7 +3429,7 @@ public: |
|
|
|
enum Item_result result_type () const { return STRING_RESULT; } |
|
|
|
Item_result cmp_type() const { return TIME_RESULT; } |
|
|
|
|
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return FALSE;} |
|
|
|
bool check_partition_func_processor(void *int_arg) {return FALSE;} |
|
|
|
|
|
|
|
bool is_null() |
|
|
|
{ return is_null_from_temporal(); } |
|
|
|
@ -3594,7 +3580,7 @@ protected: |
|
|
|
Item **args, *tmp_arg[2]; |
|
|
|
uint arg_count; |
|
|
|
void set_arguments(THD *thd, List<Item> &list); |
|
|
|
bool walk_args(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk_args(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
for (uint i= 0; i < arg_count; i++) |
|
|
|
{ |
|
|
|
@ -3859,7 +3845,7 @@ public: |
|
|
|
Used_tables_and_const_cache(item) { } |
|
|
|
Item_func_or_sum(THD *thd, List<Item> &list): |
|
|
|
Item_result_field(thd), Item_args(thd, list) { } |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
if (walk_args(processor, walk_subquery, arg)) |
|
|
|
return true; |
|
|
|
@ -3995,7 +3981,7 @@ public: |
|
|
|
{ |
|
|
|
return ref ? (*ref)->real_item() : this; |
|
|
|
} |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
if (ref && *ref) |
|
|
|
return (*ref)->walk(processor, walk_subquery, arg) || |
|
|
|
@ -4006,7 +3992,7 @@ public: |
|
|
|
Item* transform(THD *thd, Item_transformer, uchar *arg); |
|
|
|
Item* compile(THD *thd, Item_analyzer analyzer, uchar **arg_p, |
|
|
|
Item_transformer transformer, uchar *arg_t); |
|
|
|
bool enumerate_field_refs_processor(uchar *arg) |
|
|
|
bool enumerate_field_refs_processor(void *arg) |
|
|
|
{ return (*ref)->enumerate_field_refs_processor(arg); } |
|
|
|
void no_rows_in_result() |
|
|
|
{ |
|
|
|
@ -4049,7 +4035,7 @@ public: |
|
|
|
if (ref && result_type() == ROW_RESULT) |
|
|
|
(*ref)->bring_value(); |
|
|
|
} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("ref", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -4234,12 +4220,12 @@ public: |
|
|
|
} |
|
|
|
bool const_item() const { return orig_item->const_item(); } |
|
|
|
table_map not_null_tables() const { return orig_item->not_null_tables(); } |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
return orig_item->walk(processor, walk_subquery, arg) || |
|
|
|
(this->*processor)(arg); |
|
|
|
} |
|
|
|
bool enumerate_field_refs_processor(uchar *arg) |
|
|
|
bool enumerate_field_refs_processor(void *arg) |
|
|
|
{ return orig_item->enumerate_field_refs_processor(arg); } |
|
|
|
Item_field *field_for_view_update() |
|
|
|
{ return orig_item->field_for_view_update(); } |
|
|
|
@ -4265,9 +4251,9 @@ public: |
|
|
|
orig_item->bring_value(); |
|
|
|
} |
|
|
|
virtual bool is_expensive() { return orig_item->is_expensive(); } |
|
|
|
bool is_expensive_processor(uchar *arg) |
|
|
|
bool is_expensive_processor(void *arg) |
|
|
|
{ return orig_item->is_expensive_processor(arg); } |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -4338,12 +4324,12 @@ public: |
|
|
|
void update_used_tables(); |
|
|
|
table_map not_null_tables() const; |
|
|
|
bool const_item() const { return used_tables() == 0; } |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
return (*ref)->walk(processor, walk_subquery, arg) || |
|
|
|
(this->*processor)(arg); |
|
|
|
} |
|
|
|
bool view_used_tables_processor(uchar *arg) |
|
|
|
bool view_used_tables_processor(void *arg) |
|
|
|
{ |
|
|
|
TABLE_LIST *view_arg= (TABLE_LIST *) arg; |
|
|
|
if (view_arg == view) |
|
|
|
@ -4487,7 +4473,7 @@ public: |
|
|
|
} |
|
|
|
table_map not_null_tables() const { return 0; } |
|
|
|
virtual Ref_Type ref_type() { return OUTER_REF; } |
|
|
|
bool check_inner_refs_processor(uchar * arg); |
|
|
|
bool check_inner_refs_processor(void * arg); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -4648,7 +4634,7 @@ public: |
|
|
|
table_map used_tables() const { return (table_map) 1L; } |
|
|
|
bool const_item() const { return 0; } |
|
|
|
bool is_null() { return null_value; } |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("copy", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -4901,7 +4887,7 @@ public: |
|
|
|
int save_in_field(Field *field_arg, bool no_conversions); |
|
|
|
table_map used_tables() const { return (table_map)0L; } |
|
|
|
|
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *args) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *args) |
|
|
|
{ |
|
|
|
return (arg && arg->walk(processor, walk_subquery, args)) || |
|
|
|
(this->*processor)(args); |
|
|
|
@ -4942,13 +4928,13 @@ public: |
|
|
|
*/ |
|
|
|
table_map used_tables() const { return RAND_TABLE_BIT; } |
|
|
|
|
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *args) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *args) |
|
|
|
{ |
|
|
|
return arg->walk(processor, walk_subquery, args) || |
|
|
|
(this->*processor)(args); |
|
|
|
} |
|
|
|
bool check_partition_func_processor(uchar *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_partition_func_processor(void *int_arg) {return TRUE;} |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("values", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -5037,7 +5023,7 @@ private: |
|
|
|
*/ |
|
|
|
bool read_only; |
|
|
|
public: |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("trigger", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -5124,7 +5110,7 @@ public: |
|
|
|
{ |
|
|
|
return this == item; |
|
|
|
} |
|
|
|
bool check_vcol_func_processor(uchar *arg) |
|
|
|
bool check_vcol_func_processor(void *arg) |
|
|
|
{ |
|
|
|
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE); |
|
|
|
} |
|
|
|
@ -5150,7 +5136,7 @@ public: |
|
|
|
return false; |
|
|
|
return example->is_expensive(); |
|
|
|
} |
|
|
|
bool is_expensive_processor(uchar *arg) |
|
|
|
bool is_expensive_processor(void *arg) |
|
|
|
{ |
|
|
|
DBUG_ASSERT(example); |
|
|
|
if (value_cached) |
|
|
|
@ -5158,7 +5144,7 @@ public: |
|
|
|
return example->is_expensive_processor(arg); |
|
|
|
} |
|
|
|
virtual void set_null(); |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, uchar *arg) |
|
|
|
bool walk(Item_processor processor, bool walk_subquery, void *arg) |
|
|
|
{ |
|
|
|
if (example && example->walk(processor, walk_subquery, arg)) |
|
|
|
return TRUE; |
|
|
|
|