summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/field.cc5
-rw-r--r--sql/filesort.cc7
-rw-r--r--sql/ha_partition.cc3
-rw-r--r--sql/item.cc37
-rw-r--r--sql/item.h196
-rw-r--r--sql/item_cmpfunc.cc42
-rw-r--r--sql/item_cmpfunc.h29
-rw-r--r--sql/item_func.cc6
-rw-r--r--sql/item_func.h92
-rw-r--r--sql/item_geofunc.h2
-rw-r--r--sql/item_row.cc2
-rw-r--r--sql/item_row.h6
-rw-r--r--sql/item_strfunc.h14
-rw-r--r--sql/item_subselect.cc23
-rw-r--r--sql/item_subselect.h24
-rw-r--r--sql/item_sum.cc2
-rw-r--r--sql/item_sum.h8
-rw-r--r--sql/item_timefunc.h124
-rw-r--r--sql/item_windowfunc.h2
-rw-r--r--sql/item_xmlfunc.cc4
-rw-r--r--sql/opt_range.cc5
-rw-r--r--sql/opt_table_elimination.cc2
-rw-r--r--sql/partition_info.cc10
-rw-r--r--sql/procedure.h2
-rw-r--r--sql/sql_base.cc8
-rw-r--r--sql/sql_join_cache.cc3
-rw-r--r--sql/sql_partition.cc9
-rw-r--r--sql/sql_select.cc20
-rw-r--r--sql/sql_union.cc7
-rw-r--r--sql/table.cc16
30 files changed, 332 insertions, 378 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 8b315d38ddc..00f40fae748 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -9765,9 +9765,8 @@ bool check_expression(Virtual_column_info *vcol, const char *type,
*/
res.errors= 0;
- ret= vcol->expr_item->walk(&Item::check_vcol_func_processor, 0,
- (uchar*) &res);
- vcol->non_deterministic= MY_TEST(res.errors & VCOL_NON_DETERMINISTIC);
+ ret= vcol->expr_item->walk(&Item::check_vcol_func_processor, 0, &res);
+ vcol->non_deterministic= res.errors & VCOL_NON_DETERMINISTIC;
if (ret ||
(res.errors &
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 4bfeaf90a68..c2ea2647351 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -743,7 +743,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
0 : !select->pre_idx_push_select_cond ?
select->cond : select->pre_idx_push_select_cond;
if (sort_cond)
- sort_cond->walk(&Item::register_field_in_read_map, 1, (uchar*) sort_form);
+ sort_cond->walk(&Item::register_field_in_read_map, 1, sort_form);
sort_form->column_bitmaps_set(&sort_form->tmp_set, &sort_form->tmp_set,
&sort_form->tmp_set);
@@ -1253,15 +1253,14 @@ static void register_used_fields(Sort_param *param)
if (field->vcol_info)
{
Item *vcol_item= field->vcol_info->expr_item;
- vcol_item->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+ vcol_item->walk(&Item::register_field_in_read_map, 1, 0);
}
bitmap_set_bit(bitmap, field->field_index);
}
}
else
{ // Item
- sort_field->item->walk(&Item::register_field_in_read_map, 1,
- (uchar *) table);
+ sort_field->item->walk(&Item::register_field_in_read_map, 1, table);
}
}
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index f5ad7ca8123..09f7deb805b 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -8467,8 +8467,7 @@ uint ha_partition::min_record_length(uint options) const
void ha_partition::register_columns_for_write()
{
if (m_part_info->part_expr)
- m_part_info->part_expr->walk(&Item::register_field_in_read_map, 1,
- (uchar *) 0);
+ m_part_info->part_expr->walk(&Item::register_field_in_read_map, 1, 0);
}
/****************************************************************************
diff --git a/sql/item.cc b/sql/item.cc
index c4385b99d39..d8a282cc151 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -621,7 +621,7 @@ void Item::cleanup()
@param arg a dummy parameter, is not used here
*/
-bool Item::cleanup_processor(uchar *arg)
+bool Item::cleanup_processor(void *arg)
{
if (fixed)
cleanup();
@@ -782,7 +782,7 @@ void Item_ident::cleanup()
DBUG_VOID_RETURN;
}
-bool Item_ident::remove_dependence_processor(uchar * arg)
+bool Item_ident::remove_dependence_processor(void * arg)
{
DBUG_ENTER("Item_ident::remove_dependence_processor");
if (get_depended_from() == (st_select_lex *) arg)
@@ -792,7 +792,7 @@ bool Item_ident::remove_dependence_processor(uchar * arg)
}
-bool Item_ident::collect_outer_ref_processor(uchar *param)
+bool Item_ident::collect_outer_ref_processor(void *param)
{
Collect_deps_prm *prm= (Collect_deps_prm *)param;
if (depended_from &&
@@ -826,7 +826,7 @@ bool Item_ident::collect_outer_ref_processor(uchar *param)
for the subsequent items.
*/
-bool Item_field::collect_item_field_processor(uchar *arg)
+bool Item_field::collect_item_field_processor(void *arg)
{
DBUG_ENTER("Item_field::collect_item_field_processor");
DBUG_PRINT("info", ("%s", field->field_name ? field->field_name : "noname"));
@@ -843,7 +843,7 @@ bool Item_field::collect_item_field_processor(uchar *arg)
}
-bool Item_field::add_field_to_set_processor(uchar *arg)
+bool Item_field::add_field_to_set_processor(void *arg)
{
DBUG_ENTER("Item_field::add_field_to_set_processor");
DBUG_PRINT("info", ("%s", field->field_name ? field->field_name : "noname"));
@@ -869,7 +869,7 @@ bool Item_field::add_field_to_set_processor(uchar *arg)
FALSE otherwise
*/
-bool Item_field::find_item_in_field_list_processor(uchar *arg)
+bool Item_field::find_item_in_field_list_processor(void *arg)
{
KEY_PART_INFO *first_non_group_part= *((KEY_PART_INFO **) arg);
KEY_PART_INFO *last_part= *(((KEY_PART_INFO **) arg) + 1);
@@ -892,7 +892,7 @@ bool Item_field::find_item_in_field_list_processor(uchar *arg)
column read set or to register used fields in a view or check constraint
*/
-bool Item_field::register_field_in_read_map(uchar *arg)
+bool Item_field::register_field_in_read_map(void *arg)
{
TABLE *table= (TABLE *) arg;
if (field->table == table || !table)
@@ -913,7 +913,7 @@ bool Item_field::register_field_in_read_map(uchar *arg)
Mark field in bitmap supplied as *arg
*/
-bool Item_field::register_field_in_bitmap(uchar *arg)
+bool Item_field::register_field_in_bitmap(void *arg)
{
MY_BITMAP *bitmap= (MY_BITMAP *) arg;
DBUG_ASSERT(bitmap);
@@ -929,7 +929,7 @@ bool Item_field::register_field_in_bitmap(uchar *arg)
This is used by UPDATE to register underlying fields of used view fields.
*/
-bool Item_field::register_field_in_write_map(uchar *arg)
+bool Item_field::register_field_in_write_map(void *arg)
{
TABLE *table= (TABLE *) arg;
if (field->table == table || !table)
@@ -956,7 +956,7 @@ bool Item_field::register_field_in_write_map(uchar *arg)
as the upper level will ensure that all these will be given a value.
*/
-bool Item_field::check_field_expression_processor(uchar *arg)
+bool Item_field::check_field_expression_processor(void *arg)
{
if (field->flags & NO_DEFAULT_VALUE_FLAG)
return 0;
@@ -1409,7 +1409,7 @@ void mark_unsupported_func(const char *where, const char *processor_name)
#define mark_unsupported_func(X,Y) {}
#endif
-bool mark_unsupported_function(const char *where, uchar *store, uint result)
+bool mark_unsupported_function(const char *where, void *store, uint result)
{
Item::vcol_func_processor_result *res=
(Item::vcol_func_processor_result*) store;
@@ -2452,14 +2452,14 @@ void Item_field::reset_field(Field *f)
}
-bool Item_field::enumerate_field_refs_processor(uchar *arg)
+bool Item_field::enumerate_field_refs_processor(void *arg)
{
Field_enumerator *fe= (Field_enumerator*)arg;
fe->visit_field(this);
return FALSE;
}
-bool Item_field::update_table_bitmaps_processor(uchar *arg)
+bool Item_field::update_table_bitmaps_processor(void *arg)
{
update_table_bitmaps();
return FALSE;
@@ -2475,7 +2475,7 @@ static inline void set_field_to_new_field(Field **field, Field **new_field)
}
}
-bool Item_field::switch_to_nullable_fields_processor(uchar *arg)
+bool Item_field::switch_to_nullable_fields_processor(void *arg)
{
Field **new_fields= (Field **)arg;
set_field_to_new_field(&field, new_fields);
@@ -5273,7 +5273,7 @@ error:
Mark virtual columns as used in a partitioning expression
*/
-bool Item_field::vcol_in_partition_func_processor(uchar *int_arg)
+bool Item_field::vcol_in_partition_func_processor(void *int_arg)
{
DBUG_ASSERT(fixed);
if (field->vcol_info)
@@ -6616,7 +6616,7 @@ Item* Item::cache_const_expr_transformer(THD *thd, uchar *arg)
/**
Find Item by reference in the expression
*/
-bool Item::find_item_processor(uchar *arg)
+bool Item::find_item_processor(void *arg)
{
return (this == ((Item *) arg));
}
@@ -7051,8 +7051,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
Dependency_marker dep_marker;
dep_marker.current_select= current_sel;
dep_marker.thd= thd;
- (*ref)->walk(&Item::enumerate_field_refs_processor, FALSE,
- (uchar*)&dep_marker);
+ (*ref)->walk(&Item::enumerate_field_refs_processor, FALSE, &dep_marker);
}
DBUG_ASSERT(*ref);
@@ -8034,7 +8033,7 @@ void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr)
FALSE always
*/
-bool Item_outer_ref::check_inner_refs_processor(uchar *arg)
+bool Item_outer_ref::check_inner_refs_processor(void *arg)
{
List_iterator_fast<Item_outer_ref> *it=
((List_iterator_fast<Item_outer_ref> *) arg);
diff --git a/sql/item.h b/sql/item.h
index 9794d987be1..41813e0a80f 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -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;
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 335228c37fa..2d38e705b0a 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1218,7 +1218,7 @@ void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent, Item **ref)
}
-bool Item_in_optimizer::eval_not_null_tables(uchar *opt_arg)
+bool Item_in_optimizer::eval_not_null_tables(void *opt_arg)
{
not_null_tables_cache= 0;
if (is_top_level_item())
@@ -1287,8 +1287,7 @@ bool Item_in_optimizer::fix_left(THD *thd)
for (uint i= 0; i < n; i++)
{
/* Check that the expression (part of row) do not contain a subquery */
- if (args[0]->element_index(i)->walk(&Item::is_subquery_processor,
- FALSE, NULL))
+ if (args[0]->element_index(i)->walk(&Item::is_subquery_processor, 0, 0))
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"SUBQUERY in ROW in left expression of IN/ALL/ANY");
@@ -1717,7 +1716,7 @@ Item *Item_in_optimizer::transform(THD *thd, Item_transformer transformer,
}
-bool Item_in_optimizer::is_expensive_processor(uchar *arg)
+bool Item_in_optimizer::is_expensive_processor(void *arg)
{
return args[0]->is_expensive_processor(arg) ||
args[1]->is_expensive_processor(arg);
@@ -2013,7 +2012,7 @@ longlong Item_func_interval::val_int()
*/
-bool Item_func_between::eval_not_null_tables(uchar *opt_arg)
+bool Item_func_between::eval_not_null_tables(void *opt_arg)
{
if (Item_func_opt_neg::eval_not_null_tables(NULL))
return 1;
@@ -2030,7 +2029,7 @@ bool Item_func_between::eval_not_null_tables(uchar *opt_arg)
}
-bool Item_func_between::count_sargable_conds(uchar *arg)
+bool Item_func_between::count_sargable_conds(void *arg)
{
SELECT_LEX *sel= (SELECT_LEX *) arg;
sel->cond_count++;
@@ -2376,7 +2375,7 @@ Item_func_if::fix_fields(THD *thd, Item **ref)
bool
-Item_func_if::eval_not_null_tables(uchar *opt_arg)
+Item_func_if::eval_not_null_tables(void *opt_arg)
{
if (Item_func::eval_not_null_tables(NULL))
return 1;
@@ -3983,7 +3982,7 @@ cmp_item *cmp_item_datetime::make_same()
}
-bool Item_func_in::count_sargable_conds(uchar *arg)
+bool Item_func_in::count_sargable_conds(void *arg)
{
((SELECT_LEX*) arg)->cond_count++;
return 0;
@@ -4042,7 +4041,7 @@ Item_func_in::fix_fields(THD *thd, Item **ref)
bool
-Item_func_in::eval_not_null_tables(uchar *opt_arg)
+Item_func_in::eval_not_null_tables(void *opt_arg)
{
Item **arg, **arg_end;
@@ -4546,7 +4545,7 @@ Item_cond::fix_fields(THD *thd, Item **ref)
bool
-Item_cond::eval_not_null_tables(uchar *opt_arg)
+Item_cond::eval_not_null_tables(void *opt_arg)
{
Item *item;
List_iterator<Item> li(list);
@@ -4617,7 +4616,7 @@ void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref)
}
-bool Item_cond::walk(Item_processor processor, bool walk_subquery, uchar *arg)
+bool Item_cond::walk(Item_processor processor, bool walk_subquery, void *arg)
{
List_iterator_fast<Item> li(list);
Item *item;
@@ -4627,17 +4626,6 @@ bool Item_cond::walk(Item_processor processor, bool walk_subquery, uchar *arg)
return Item_func::walk(processor, walk_subquery, arg);
}
-bool Item_cond_and::walk_top_and(Item_processor processor, uchar *arg)
-{
- List_iterator_fast<Item> li(list);
- Item *item;
- while ((item= li++))
- if (item->walk_top_and(processor, arg))
- return 1;
- return Item_cond::walk_top_and(processor, arg);
-}
-
-
/**
Transform an Item_cond object with a transformer callback function.
@@ -4962,7 +4950,7 @@ Item *and_expressions(THD *thd, Item *a, Item *b, Item **org_item)
}
-bool Item_func_null_predicate::count_sargable_conds(uchar *arg)
+bool Item_func_null_predicate::count_sargable_conds(void *arg)
{
((SELECT_LEX*) arg)->cond_count++;
return 0;
@@ -5021,7 +5009,7 @@ void Item_func_isnotnull::print(String *str, enum_query_type query_type)
}
-bool Item_bool_func2::count_sargable_conds(uchar *arg)
+bool Item_bool_func2::count_sargable_conds(void *arg)
{
((SELECT_LEX*) arg)->cond_count++;
return 0;
@@ -5195,7 +5183,7 @@ void Item_func_like::cleanup()
}
-bool Item_func_like::find_selective_predicates_list_processor(uchar *arg)
+bool Item_func_like::find_selective_predicates_list_processor(void *arg)
{
find_selective_predicates_list_processor_data *data=
(find_selective_predicates_list_processor_data *) arg;
@@ -6425,7 +6413,7 @@ void Item_equal::update_used_tables()
}
-bool Item_equal::count_sargable_conds(uchar *arg)
+bool Item_equal::count_sargable_conds(void *arg)
{
SELECT_LEX *sel= (SELECT_LEX *) arg;
uint m= equal_items.elements;
@@ -6491,7 +6479,7 @@ void Item_equal::fix_length_and_dec()
}
-bool Item_equal::walk(Item_processor processor, bool walk_subquery, uchar *arg)
+bool Item_equal::walk(Item_processor processor, bool walk_subquery, void *arg)
{
Item *item;
Item_equal_fields_iterator it(*this);
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 4a2948e4439..c1140b61efb 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -336,13 +336,13 @@ public:
void keep_top_level_cache();
Item *transform(THD *thd, Item_transformer transformer, uchar *arg);
virtual Item *expr_cache_insert_transformer(THD *thd, uchar *unused);
- bool is_expensive_processor(uchar *arg);
+ bool is_expensive_processor(void *arg);
bool is_expensive();
void set_join_tab_idx(uint join_tab_idx_arg)
{ args[1]->set_join_tab_idx(join_tab_idx_arg); }
virtual void get_cache_parameters(List<Item> &parameters);
bool is_top_level_item();
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
bool invisible_mode();
void reset_cache() { cache= NULL; }
@@ -365,7 +365,7 @@ public:
bool is_null() { return MY_TEST(args[0]->is_null() || args[1]->is_null()); }
COND *remove_eq_conds(THD *thd, Item::cond_result *cond_value,
bool top_level);
- bool count_sargable_conds(uchar *arg);
+ bool count_sargable_conds(void *arg);
/*
Specifies which result type the function uses to compare its arguments.
This method is used in equal field propagation.
@@ -824,9 +824,9 @@ public:
const char *func_name() const { return "between"; }
void fix_length_and_dec();
virtual void print(String *str, enum_query_type query_type);
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
- bool count_sargable_conds(uchar *arg);
+ bool count_sargable_conds(void *arg);
void add_key_fields(JOIN *join, KEY_FIELD **key_fields,
uint *and_level, table_map usable_tables,
SARGABLE_PARAM **sargables);
@@ -980,7 +980,7 @@ public:
return Item_func_case_abbreviation2::decimal_precision2(args + 1);
}
const char *func_name() const { return "if"; }
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
private:
void cache_type_info(Item *source);
@@ -1583,9 +1583,9 @@ public:
virtual void print(String *str, enum_query_type query_type);
enum Functype functype() const { return IN_FUNC; }
const char *func_name() const { return " IN "; }
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
- bool count_sargable_conds(uchar *arg);
+ bool count_sargable_conds(void *arg);
};
class cmp_item_row :public cmp_item
@@ -1645,7 +1645,7 @@ public:
CHARSET_INFO *compare_collation() const
{ return args[0]->collation.collation; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=0; }
- bool count_sargable_conds(uchar *arg);
+ bool count_sargable_conds(void *arg);
};
@@ -1863,7 +1863,7 @@ public:
}
void cleanup();
- bool find_selective_predicates_list_processor(uchar *arg);
+ bool find_selective_predicates_list_processor(void *arg);
};
@@ -2064,7 +2064,7 @@ public:
void top_level_item() { abort_on_null=1; }
bool top_level() { return abort_on_null; }
void copy_andor_arguments(THD *thd, Item_cond *item);
- bool walk(Item_processor processor, bool walk_subquery, uchar *arg);
+ bool walk(Item_processor processor, bool walk_subquery, void *arg);
Item *transform(THD *thd, Item_transformer transformer, uchar *arg);
void traverse_cond(Cond_traverser, void *arg, traverse_order order);
void neg_arguments(THD *thd);
@@ -2072,7 +2072,7 @@ public:
Item* propagate_equal_fields(THD *, const Context &, COND_EQUAL *);
Item *compile(THD *thd, Item_analyzer analyzer, uchar **arg_p,
Item_transformer transformer, uchar *arg_t);
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
};
template <template<class> class LI, class T> class Item_equal_iterator;
@@ -2237,7 +2237,7 @@ public:
uint *and_level, table_map usable_tables,
SARGABLE_PARAM **sargables);
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr);
- bool walk(Item_processor processor, bool walk_subquery, uchar *arg);
+ bool walk(Item_processor processor, bool walk_subquery, void *arg);
Item *transform(THD *thd, Item_transformer transformer, uchar *arg);
virtual void print(String *str, enum_query_type query_type);
Item_result compare_type() const { return m_compare_type; }
@@ -2246,7 +2246,7 @@ public:
void set_context_field(Item_field *ctx_field) { context_field= ctx_field; }
void set_link_equal_fields(bool flag) { link_equal_fields= flag; }
friend class Item_equal_fields_iterator;
- bool count_sargable_conds(uchar *arg);
+ bool count_sargable_conds(void *arg);
friend class Item_equal_iterator<List_iterator_fast,Item>;
friend class Item_equal_iterator<List_iterator,Item>;
friend Item *eliminate_item_equal(THD *thd, COND *cond,
@@ -2383,7 +2383,6 @@ public:
Item *neg_transformer(THD *thd);
void mark_as_condition_AND_part(TABLE_LIST *embedding);
virtual uint exists2in_reserved_items() { return list.elements; };
- bool walk_top_and(Item_processor processor, uchar *arg);
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
bool link_item_fields,
COND_EQUAL **cond_equal_ref);
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 95ee128d95b..bda3b76a8dd 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -257,7 +257,7 @@ Item_func::quick_fix_field()
bool
-Item_func::eval_not_null_tables(uchar *opt_arg)
+Item_func::eval_not_null_tables(void *opt_arg)
{
Item **arg,**arg_end;
not_null_tables_cache= 0;
@@ -4741,7 +4741,7 @@ Item_func_set_user_var::fix_length_and_dec()
column read set or to register used fields in a view
*/
-bool Item_func_set_user_var::register_field_in_read_map(uchar *arg)
+bool Item_func_set_user_var::register_field_in_read_map(void *arg)
{
if (result_field)
{
@@ -4760,7 +4760,7 @@ bool Item_func_set_user_var::register_field_in_read_map(uchar *arg)
*/
-bool Item_func_set_user_var::register_field_in_bitmap(uchar *arg)
+bool Item_func_set_user_var::register_field_in_bitmap(void *arg)
{
MY_BITMAP *bitmap = (MY_BITMAP *) arg;
DBUG_ASSERT(bitmap);
diff --git a/sql/item_func.h b/sql/item_func.h
index 71b65103f04..ddb56015224 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -201,8 +201,8 @@ public:
Item_transformer transformer, uchar *arg_t);
void traverse_cond(Cond_traverser traverser,
void * arg, traverse_order order);
- bool eval_not_null_tables(uchar *opt_arg);
- // bool is_expensive_processor(uchar *arg);
+ bool eval_not_null_tables(void *opt_arg);
+ // bool is_expensive_processor(void *arg);
// virtual bool is_expensive() { return 0; }
inline void raise_numeric_overflow(const char *type_name)
{
@@ -325,12 +325,12 @@ public:
representation of a TIMESTAMP argument verbatim, and thus does not depend on
the timezone.
*/
- virtual bool check_valid_arguments_processor(uchar *bool_arg)
+ virtual bool check_valid_arguments_processor(void *bool_arg)
{
return has_timestamp_args();
}
- virtual bool find_function_processor (uchar *arg)
+ virtual bool find_function_processor (void *arg)
{
return functype() == *(Functype *) arg;
}
@@ -612,7 +612,7 @@ public:
void fix_length_and_dec();
bool fix_fields(THD *thd, Item **ref);
longlong val_int() { DBUG_ASSERT(fixed == 1); return value; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
@@ -710,8 +710,8 @@ class Item_func_additive_op :public Item_num_op
public:
Item_func_additive_op(THD *thd, Item *a, Item *b): Item_num_op(thd, a, b) {}
void result_precision();
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
@@ -749,8 +749,8 @@ public:
double real_op();
my_decimal *decimal_op(my_decimal *);
void result_precision();
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
@@ -782,8 +782,8 @@ public:
print_op(str, query_type);
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
bool need_parentheses_in_default() { return true; }
};
@@ -798,8 +798,8 @@ public:
const char *func_name() const { return "%"; }
void result_precision();
void fix_length_and_dec();
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
@@ -814,8 +814,8 @@ public:
enum Functype functype() const { return NEG_FUNC; }
void fix_length_and_dec();
uint decimal_precision() const { return args[0]->decimal_precision(); }
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
bool need_parentheses_in_default() { return true; }
};
@@ -829,8 +829,8 @@ public:
my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "abs"; }
void fix_length_and_dec();
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
// A class to handle logarithmic and trigonometric functions
@@ -992,8 +992,8 @@ public:
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
@@ -1005,8 +1005,8 @@ public:
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
};
/* This handles round and truncate */
@@ -1039,7 +1039,7 @@ public:
void update_used_tables();
bool fix_fields(THD *thd, Item **ref);
void cleanup() { first_eval= TRUE; Item_real_func::cleanup(); }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
@@ -1335,7 +1335,7 @@ public:
unsigned_flag=1;
}
bool fix_fields(THD *thd, Item **ref);
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1352,7 +1352,7 @@ public:
const char *func_name() const { return "benchmark"; }
void fix_length_and_dec() { max_length=1; maybe_null=0; }
virtual void print(String *str, enum_query_type query_type);
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1374,7 +1374,7 @@ public:
}
bool is_expensive() { return 1; }
longlong val_int();
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1397,7 +1397,7 @@ class Item_udf_func :public Item_func
}
protected:
udf_handler udf;
- bool is_expensive_processor(uchar *arg) { return TRUE; }
+ bool is_expensive_processor(void *arg) { return TRUE; }
public:
Item_udf_func(THD *thd, udf_func *udf_arg):
@@ -1469,7 +1469,7 @@ public:
table_map not_null_tables() const { return 0; }
bool is_expensive() { return 1; }
virtual void print(String *str, enum_query_type query_type);
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_UNKNOWN);
}
@@ -1644,7 +1644,7 @@ class Item_func_get_lock :public Item_int_func
}
bool const_item() const { return 0; }
bool is_expensive() { return 1; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1664,7 +1664,7 @@ public:
}
bool const_item() const { return 0; }
bool is_expensive() { return 1; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1684,7 +1684,7 @@ public:
longlong val_int();
const char *func_name() const { return "master_pos_wait"; }
void fix_length_and_dec() { max_length=21; maybe_null=1;}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1700,7 +1700,7 @@ public:
longlong val_int();
const char *func_name() const { return "master_gtid_wait"; }
void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1728,7 +1728,7 @@ public:
Item_func_user_var(THD *thd, Item_func_user_var *item)
:Item_hybrid_func(thd, item),
m_var_entry(item->m_var_entry), name(item->name) { }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("user_var", arg, VCOL_IMPOSSIBLE);
}
@@ -1816,8 +1816,8 @@ public:
void save_org_in_field(Field *field,
fast_field_copier data __attribute__ ((__unused__)))
{ (void)save_in_field(field, 1, 0); }
- bool register_field_in_read_map(uchar *arg);
- bool register_field_in_bitmap(uchar *arg);
+ bool register_field_in_read_map(void *arg);
+ bool register_field_in_bitmap(void *arg);
bool set_entry(THD *thd, bool create_if_not_exists);
void cleanup();
};
@@ -1938,7 +1938,7 @@ public:
bool eq(const Item *item, bool binary_cmp) const;
void cleanup();
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
@@ -1974,7 +1974,7 @@ public:
table= 0; // required by Item_func_match::eq()
DBUG_VOID_RETURN;
}
- bool is_expensive_processor(uchar *arg) { return TRUE; }
+ bool is_expensive_processor(void *arg) { return TRUE; }
enum Functype functype() const { return FT_FUNC; }
const char *func_name() const { return "match"; }
table_map not_null_tables() const { return 0; }
@@ -1987,7 +1987,7 @@ public:
bool fix_index();
void init_search(THD *thd, bool no_order);
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -2044,7 +2044,7 @@ public:
longlong val_int();
const char *func_name() const { return "is_free_lock"; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1;}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -2058,7 +2058,7 @@ public:
longlong val_int();
const char *func_name() const { return "is_used_lock"; }
void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1;}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -2108,7 +2108,7 @@ public:
longlong val_int();
const char *func_name() const { return "row_count"; }
void fix_length_and_dec() { decimals= 0; maybe_null=0; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -2143,7 +2143,7 @@ private:
bool init_result_field(THD *thd);
protected:
- bool is_expensive_processor(uchar *arg)
+ bool is_expensive_processor(void *arg)
{ return is_expensive(); }
public:
@@ -2219,7 +2219,7 @@ public:
execute();
}
- virtual bool change_context_processor(uchar *cntx)
+ virtual bool change_context_processor(void *cntx)
{ context= (Name_resolution_context *)cntx; return FALSE; }
bool sp_check_access(THD * thd);
@@ -2234,11 +2234,11 @@ public:
return sp_result_field;
}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
- bool limit_index_condition_pushdown_processor(uchar *opt_arg)
+ bool limit_index_condition_pushdown_processor(void *opt_arg)
{
return TRUE;
}
@@ -2252,7 +2252,7 @@ public:
longlong val_int();
const char *func_name() const { return "found_rows"; }
void fix_length_and_dec() { decimals= 0; maybe_null=0; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -2270,7 +2270,7 @@ public:
void fix_length_and_dec()
{ max_length= 21; unsigned_flag=1; }
table_map used_tables() const { return RAND_TABLE_BIT; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index cde61bd38ca..d3b49b6e457 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -616,7 +616,7 @@ class Item_func_gis_debug: public Item_int_func
{ null_value= false; }
const char *func_name() const { return "st_gis_debug"; }
longlong val_int();
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 56d73f7b759..a17d2507547 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -72,7 +72,7 @@ bool Item_row::fix_fields(THD *thd, Item **ref)
bool
-Item_row::eval_not_null_tables(uchar *opt_arg)
+Item_row::eval_not_null_tables(void *opt_arg)
{
Item **arg,**arg_end;
not_null_tables_cache= 0;
diff --git a/sql/item_row.h b/sql/item_row.h
index f632c786a30..eb2686090e1 100644
--- a/sql/item_row.h
+++ b/sql/item_row.h
@@ -104,14 +104,14 @@ public:
table_map not_null_tables() const { return not_null_tables_cache; }
virtual void print(String *str, enum_query_type query_type);
- 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;
return (this->*processor)(arg);
}
Item *transform(THD *thd, Item_transformer transformer, uchar *arg);
- bool eval_not_null_tables(uchar *opt_arg);
+ bool eval_not_null_tables(void *opt_arg);
uint cols() { return arg_count; }
Item* element_index(uint i) { return args[i]; }
@@ -119,7 +119,7 @@ public:
bool check_cols(uint c);
bool null_inside() { return with_null; };
void bring_value();
- bool check_vcol_func_processor(uchar *arg) {return FALSE; }
+ bool check_vcol_func_processor(void *arg) {return FALSE; }
};
#endif /* ITEM_ROW_INCLUDED */
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index e484e41d300..623f33b1eca 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -517,7 +517,7 @@ public:
String *val_str(String *);
void fix_length_and_dec() { maybe_null=1; max_length = 13; }
const char *func_name() const { return "encrypt"; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return FALSE;
}
@@ -569,7 +569,7 @@ public:
call
*/
virtual const char *fully_qualified_func_name() const = 0;
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(fully_qualified_func_name(), arg,
VCOL_NON_DETERMINISTIC);
@@ -625,7 +625,7 @@ public:
const char *func_name() const { return "current_user"; }
const char *fully_qualified_func_name() const { return "current_user()"; }
/* This is because of the stored Name_resolution_context */
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(fully_qualified_func_name(), arg,
VCOL_IMPOSSIBLE);
@@ -652,7 +652,7 @@ public:
const char *fully_qualified_func_name() const { return "current_role()"; }
String *val_str(String *);
/* This is because of the stored Name_resolution_context */
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(fully_qualified_func_name(), arg,
VCOL_IMPOSSIBLE);
@@ -761,7 +761,7 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "binlog_gtid_pos"; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -921,7 +921,7 @@ public:
maybe_null=1;
max_length=MAX_BLOB_WIDTH;
}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1189,7 +1189,7 @@ public:
}
const char *func_name() const{ return "uuid"; }
String *val_str(String *);
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_NON_DETERMINISTIC);
}
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 7291f0a5b3f..28d33ac4f7c 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -324,7 +324,7 @@ end:
}
-bool Item_subselect::enumerate_field_refs_processor(uchar *arg)
+bool Item_subselect::enumerate_field_refs_processor(void *arg)
{
List_iterator<Ref_to_outside> it(upper_refs);
Ref_to_outside *upper;
@@ -337,7 +337,7 @@ bool Item_subselect::enumerate_field_refs_processor(uchar *arg)
return FALSE;
}
-bool Item_subselect::mark_as_eliminated_processor(uchar *arg)
+bool Item_subselect::mark_as_eliminated_processor(void *arg)
{
eliminated= TRUE;
return FALSE;
@@ -354,7 +354,7 @@ bool Item_subselect::mark_as_eliminated_processor(uchar *arg)
FALSE to force the evaluation of the processor for the subsequent items.
*/
-bool Item_subselect::eliminate_subselect_processor(uchar *arg)
+bool Item_subselect::eliminate_subselect_processor(void *arg)
{
unit->item= NULL;
unit->exclude_from_tree();
@@ -374,7 +374,7 @@ bool Item_subselect::eliminate_subselect_processor(uchar *arg)
FALSE to force the evaluation of the processor for the subsequent items.
*/
-bool Item_subselect::set_fake_select_as_master_processor(uchar *arg)
+bool Item_subselect::set_fake_select_as_master_processor(void *arg)
{
SELECT_LEX *fake_select= (SELECT_LEX*) arg;
/*
@@ -522,8 +522,7 @@ void Item_subselect::recalc_used_tables(st_select_lex *new_parent,
Field_fixer fixer;
fixer.used_tables= 0;
fixer.new_parent= new_parent;
- upper->item->walk(&Item::enumerate_field_refs_processor, FALSE,
- (uchar*)&fixer);
+ upper->item->walk(&Item::enumerate_field_refs_processor, 0, &fixer);
used_tables_cache |= fixer.used_tables;
upper->item->walk(&Item::update_table_bitmaps_processor, FALSE, NULL);
/*
@@ -601,7 +600,7 @@ bool Item_subselect::is_expensive()
bool Item_subselect::walk(Item_processor processor, bool walk_subquery,
- uchar *argument)
+ void *argument)
{
if (!(unit->uncacheable & ~UNCACHEABLE_DEPENDENT) && engine->is_executed() &&
!unit->describe)
@@ -700,7 +699,7 @@ void Item_subselect::get_cache_parameters(List<Item> &parameters)
unit->first_select()->nest_level, // nest_level
TRUE // collect
};
- walk(&Item::collect_outer_ref_processor, TRUE, (uchar*)&prm);
+ walk(&Item::collect_outer_ref_processor, TRUE, &prm);
}
int Item_in_subselect::optimize(double *out_rows, double *cost)
@@ -1779,7 +1778,7 @@ Item_in_subselect::single_value_transformer(JOIN *join)
select and is not outer anymore.
*/
where_item->walk(&Item::remove_dependence_processor, 0,
- (uchar *) select_lex->outer_select());
+ select_lex->outer_select());
/*
fix_field of substitution item will be done in time of
substituting.
@@ -2745,7 +2744,7 @@ alloc_err:
@return TRUE in case of error and FALSE otherwise.
*/
-bool Item_exists_subselect::exists2in_processor(uchar *opt_arg)
+bool Item_exists_subselect::exists2in_processor(void *opt_arg)
{
THD *thd= (THD *)opt_arg;
SELECT_LEX *first_select=unit->first_select(), *save_select;
@@ -2795,7 +2794,7 @@ bool Item_exists_subselect::exists2in_processor(uchar *opt_arg)
unit->first_select()->nest_level, // nest_level
FALSE // collect
};
- walk(&Item::collect_outer_ref_processor, TRUE, (uchar*)&prm);
+ walk(&Item::collect_outer_ref_processor, TRUE, &prm);
DBUG_ASSERT(prm.count > 0);
DBUG_ASSERT(prm.count >= (uint)eqs.elements());
will_be_correlated= prm.count > (uint)eqs.elements();
@@ -2933,7 +2932,7 @@ bool Item_exists_subselect::exists2in_processor(uchar *opt_arg)
uint i;
for (i= 0; i < (uint)eqs.elements(); i++)
if (eqs.at(i).outer_exp->
- walk(&Item::find_item_processor, TRUE, (uchar*)upper->item))
+ walk(&Item::find_item_processor, TRUE, upper->item))
break;
if (i == (uint)eqs.elements() &&
(in_subs->upper_refs.push_back(upper, thd->stmt_arena->mem_root)))
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index e5adfaa6bee..edbfc050971 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -215,12 +215,12 @@ public:
*/
virtual void reset_value_registration() {}
enum_parsing_place place() { return parsing_place; }
- bool walk(Item_processor processor, bool walk_subquery, uchar *arg);
- bool mark_as_eliminated_processor(uchar *arg);
- bool eliminate_subselect_processor(uchar *arg);
- bool set_fake_select_as_master_processor(uchar *arg);
- bool enumerate_field_refs_processor(uchar *arg);
- bool check_vcol_func_processor(uchar *arg)
+ bool walk(Item_processor processor, bool walk_subquery, 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)
{
return mark_unsupported_function("subselect", arg, VCOL_IMPOSSIBLE);
}
@@ -233,7 +233,7 @@ public:
@retval TRUE if the predicate is expensive
@retval FALSE otherwise
*/
- bool is_expensive_processor(uchar *arg) { return is_expensive(); }
+ bool is_expensive_processor(void *arg) { return is_expensive(); }
/**
Get the SELECT_LEX structure associated with this Item.
@@ -242,9 +242,9 @@ public:
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 (uchar *opt_arg) { return 1; }
- bool exists2in_processor(uchar *opt_arg) { return 0; }
- bool limit_index_condition_pushdown_processor(uchar *opt_arg)
+ 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)
{
return TRUE;
}
@@ -393,7 +393,7 @@ public:
bool select_transformer(JOIN *join);
void top_level_item() { abort_on_null=1; }
inline bool is_top_level_item() { return abort_on_null; }
- bool exists2in_processor(uchar *opt_arg);
+ bool exists2in_processor(void *opt_arg);
Item* expr_cache_insert_transformer(THD *thd, uchar *unused);
@@ -699,7 +699,7 @@ public:
in_strategy= (SUBS_STRATEGY_CHOSEN | strategy);
DBUG_VOID_RETURN;
}
- bool exists2in_processor(uchar *opt_arg __attribute__((unused)))
+ bool exists2in_processor(void *opt_arg __attribute__((unused)))
{
return 0;
};
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index f7e02bc55f9..90a9887f7f7 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -385,7 +385,7 @@ bool Item_sum::register_sum_func(THD *thd, Item **ref)
}
-bool Item_sum::collect_outer_ref_processor(uchar *param)
+bool Item_sum::collect_outer_ref_processor(void *param)
{
Collect_deps_prm *prm= (Collect_deps_prm *)param;
SELECT_LEX *ds;
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 7c11205ba5f..b5f7b1458be 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -488,7 +488,7 @@ public:
{
return Item::create_tmp_field(group, table, MY_INT32_NUM_DECIMAL_DIGITS);
}
- virtual bool collect_outer_ref_processor(uchar *param);
+ virtual bool collect_outer_ref_processor(void *param);
bool init_sum_func_check(THD *thd);
bool check_sum_func(THD *thd, Item **ref);
bool register_sum_func(THD *thd, Item **ref);
@@ -547,7 +547,7 @@ public:
virtual void remove() { DBUG_ASSERT(0); }
virtual void cleanup();
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -1159,7 +1159,7 @@ public:
table_map used_tables() const { return (table_map) 1L; }
void set_result_field(Field *) { DBUG_ASSERT(0); }
void save_in_result_field(bool no_conversions) { DBUG_ASSERT(0); }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(name, arg, VCOL_IMPOSSIBLE);
}
@@ -1600,7 +1600,7 @@ public:
Item *copy_or_same(THD* thd);
void no_rows_in_result() {}
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; }
};
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index e0624688f05..e5040d51b72 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -84,9 +84,9 @@ public:
}
enum_monotonicity_info get_monotonicity_info() const;
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -107,9 +107,9 @@ public:
}
enum_monotonicity_info get_monotonicity_info() const;
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
- bool check_partition_func_processor(uchar *bool_arg) { return FALSE;}
+ bool check_partition_func_processor(void *bool_arg) { return FALSE;}
- bool intro_version(uchar *int_arg)
+ bool intro_version(void *int_arg)
{
int *input_version= (int*)int_arg;
/* This function was introduced in 5.5 */
@@ -119,7 +119,7 @@ public:
}
/* Only meaningful with date part and optional time part */
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -138,9 +138,9 @@ public:
max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -172,9 +172,9 @@ public:
fix_char_length(2);
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -189,12 +189,12 @@ public:
const char *func_name() const { return "monthname"; }
String *val_str(String *str);
void fix_length_and_dec();
- bool check_partition_func_processor(uchar *int_arg) {return TRUE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return TRUE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -213,9 +213,9 @@ public:
fix_char_length(3);
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -234,9 +234,9 @@ public:
max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_time_args();
}
@@ -255,9 +255,9 @@ public:
max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_time_args();
}
@@ -276,9 +276,9 @@ public:
max_length=1*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -297,9 +297,9 @@ public:
max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_time_args();
}
@@ -332,9 +332,9 @@ public:
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -355,9 +355,9 @@ public:
max_length=4*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -390,9 +390,9 @@ public:
fix_char_length(1);
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_date_args();
}
@@ -408,8 +408,8 @@ class Item_func_dayname :public Item_func_weekday
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
void fix_length_and_dec();
- 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);
}
@@ -450,17 +450,17 @@ public:
const char *func_name() const { return "unix_timestamp"; }
enum_monotonicity_info get_monotonicity_info() const;
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
/*
UNIX_TIMESTAMP() depends on the current timezone
(and thus may not be used as a partitioning function)
when its argument is NOT of the TIMESTAMP type.
*/
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_timestamp_args();
}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
if (arg_count)
return FALSE;
@@ -479,9 +479,9 @@ public:
Item_func_time_to_sec(THD *thd, Item *item):
Item_func_seconds_hybrid(thd, item) {}
const char *func_name() const { return "time_to_sec"; }
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_time_args();
}
@@ -612,7 +612,7 @@ public:
MYSQL_TIME representation using UTC-SYSTEM or per-thread time zone.
*/
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_TIME_FUNC);
}
@@ -647,7 +647,7 @@ public:
Item_func_curdate(THD *thd): Item_datefunc(thd), last_query_id(0) {}
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
VCOL_TIME_FUNC);
@@ -685,7 +685,7 @@ public:
bool fix_fields(THD *, Item **);
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time)=0;
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
/*
NOW is safe for replication as slaves will run with same time as
@@ -713,7 +713,7 @@ public:
const char *func_name() const { return "utc_timestamp"; }
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
virtual enum Functype functype() const { return NOW_UTC_FUNC; }
- virtual bool check_vcol_func_processor(uchar *arg)
+ virtual bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
@@ -735,7 +735,7 @@ public:
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
table_map used_tables() const { return RAND_TABLE_BIT; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg,
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
@@ -750,9 +750,9 @@ public:
Item_func_from_days(THD *thd, Item *a): Item_datefunc(thd, a) {}
const char *func_name() const { return "from_days"; }
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return has_date_args() || has_time_args();
}
@@ -774,7 +774,7 @@ public:
void fix_length_and_dec();
uint format_length(const String *format);
bool eq(const Item *item, bool binary_cmp) const;
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -871,9 +871,9 @@ class Item_extract :public Item_int_func
void fix_length_and_dec();
bool eq(const Item *item, bool binary_cmp) const;
void print(String *str, enum_query_type query_type);
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
switch (int_type) {
case INTERVAL_YEAR:
@@ -1052,9 +1052,9 @@ public:
decimals=0;
maybe_null=1;
}
- bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
- bool check_vcol_func_processor(uchar *arg) { return FALSE;}
- bool check_valid_arguments_processor(uchar *int_arg)
+ bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ bool check_vcol_func_processor(void *arg) { return FALSE;}
+ bool check_valid_arguments_processor(void *int_arg)
{
return !has_time_args();
}
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 3674a45b5ca..56fa272ac45 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -534,7 +534,7 @@ public:
have been computed. In that case, window function will need to read its
temp.table field. In order to allow that, mark that field in the read_set.
*/
- bool register_field_in_read_map(uchar *arg)
+ bool register_field_in_read_map(void *arg)
{
TABLE *table= (TABLE*) arg;
if (result_field && (result_field->table == table || !table))
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index f5a15114c09..bf5abc882f2 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -234,7 +234,7 @@ public:
const_item_cache= false;
}
const char *func_name() const { return "nodeset"; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
@@ -572,7 +572,7 @@ public:
Item_bool_func(thd, nodeset, cmpfunc), pxml(p) {}
enum Type type() const { return XPATH_NODESET_CMP; };
const char *func_name() const { return "xpath_nodeset_to_const_comparator"; }
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
}
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 9cf6c1d5eab..08c93d3a6ed 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3122,8 +3122,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
DBUG_RETURN(TRUE);
dt->list.empty();
dt->table= table;
- if ((*cond)->walk(&Item::find_selective_predicates_list_processor, 0,
- (uchar*) dt))
+ if ((*cond)->walk(&Item::find_selective_predicates_list_processor, 0, dt))
DBUG_RETURN(TRUE);
if (dt->list.elements > 0)
{
@@ -12400,7 +12399,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
/* Check if cur_part is referenced in the WHERE clause. */
if (join->conds->walk(&Item::find_item_in_field_list_processor, 0,
- (uchar*) key_part_range))
+ key_part_range))
goto next_index;
}
}
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc
index 6835594ca07..b4131093f0f 100644
--- a/sql/opt_table_elimination.cc
+++ b/sql/opt_table_elimination.cc
@@ -1069,7 +1069,7 @@ bool Dep_analysis_context::setup_equality_modules_deps(List<Dep_module>
{
/* Regular tbl.col=expr(tblX1.col1, tblY1.col2, ...) */
eq_mod->expr->walk(&Item::enumerate_field_refs_processor, FALSE,
- (uchar*)&deps_recorder);
+ &deps_recorder);
}
else
{
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 78b7e7fca41..4f297c630ad 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -591,9 +591,9 @@ void partition_info::set_show_version_string(String *packet)
else
{
if (part_expr)
- part_expr->walk(&Item::intro_version, 0, (uchar*)&version);
+ part_expr->walk(&Item::intro_version, 0, &version);
if (subpart_expr)
- subpart_expr->walk(&Item::intro_version, 0, (uchar*)&version);
+ subpart_expr->walk(&Item::intro_version, 0, &version);
if (version == 0)
{
/* No new functions in partition function */
@@ -1669,8 +1669,7 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
if (!list_of_part_fields)
{
DBUG_ASSERT(part_expr);
- err= part_expr->walk(&Item::check_partition_func_processor, 0,
- NULL);
+ err= part_expr->walk(&Item::check_partition_func_processor, 0, NULL);
}
/* Check for sub partition expression. */
@@ -2425,8 +2424,7 @@ bool partition_info::add_column_list_value(THD *thd, Item *item)
else
thd->where= "partition function";
- if (item->walk(&Item::check_partition_func_processor, 0,
- NULL))
+ if (item->walk(&Item::check_partition_func_processor, 0, NULL))
{
my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
DBUG_RETURN(TRUE);
diff --git a/sql/procedure.h b/sql/procedure.h
index 9dd4af19cb8..b7a878344d1 100644
--- a/sql/procedure.h
+++ b/sql/procedure.h
@@ -53,7 +53,7 @@ public:
init_make_field(tmp_field,field_type());
}
unsigned int size_of() { return sizeof(*this);}
- bool check_vcol_func_processor(uchar *arg)
+ bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
}
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index b8638ac5ee5..93d21f669d1 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5480,9 +5480,9 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
else
{
if (thd->mark_used_columns == MARK_COLUMNS_READ)
- it->walk(&Item::register_field_in_read_map, 0, (uchar *) 0);
+ it->walk(&Item::register_field_in_read_map, 0, 0);
else
- it->walk(&Item::register_field_in_write_map, 0, (uchar *) 0);
+ it->walk(&Item::register_field_in_write_map, 0, 0);
}
}
else
@@ -7803,7 +7803,7 @@ void switch_to_nullable_trigger_fields(List<Item> &items, TABLE *table)
Item *item;
while ((item= it++))
- item->walk(&Item::switch_to_nullable_fields_processor, 1, (uchar*)field);
+ item->walk(&Item::switch_to_nullable_fields_processor, 1, field);
table->triggers->reset_extra_null_bitmap();
}
}
@@ -7828,7 +7828,7 @@ void switch_to_nullable_trigger_fields(Field **info, TABLE *table)
for (field_ptr= info; *field_ptr ; field_ptr++)
{
Field *field= (*field_ptr);
- field->default_value->expr_item->walk(&Item::switch_to_nullable_fields_processor, 1, (uchar*) trigger_field);
+ field->default_value->expr_item->walk(&Item::switch_to_nullable_fields_processor, 1, trigger_field);
*field_ptr= (trigger_field[field->field_index]);
}
}
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index 818598110ca..d5883b1304e 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -281,8 +281,7 @@ void JOIN_CACHE::collect_info_on_key_args()
Item *ref_item= ref->items[i];
if (!(tab->table->map & ref_item->used_tables()))
continue;
- ref_item->walk(&Item::add_field_to_set_processor, 1,
- (uchar *) tab->table);
+ ref_item->walk(&Item::add_field_to_set_processor, 1, tab->table);
}
if ((key_args= bitmap_bits_set(&tab->table->tmp_set)))
{
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 832f218fb51..d0766f41fea 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -962,8 +962,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
if (init_lex_with_single_table(thd, table, &lex))
goto end;
- func_expr->walk(&Item::change_context_processor, 0,
- (uchar*) &lex.select_lex.context);
+ func_expr->walk(&Item::change_context_processor, 0, &lex.select_lex.context);
thd->where= "partition function";
/*
In execution we must avoid the use of thd->change_item_tree since
@@ -1018,8 +1017,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
easier maintenance. This exception should be deprecated at some point
in future so that we always throw an error.
*/
- if (func_expr->walk(&Item::check_valid_arguments_processor,
- 0, NULL))
+ if (func_expr->walk(&Item::check_valid_arguments_processor, 0, NULL))
{
if (is_create_table_ind)
{
@@ -1038,8 +1036,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
end:
end_lex_with_single_table(thd, table, old_lex);
#if !defined(DBUG_OFF)
- func_expr->walk(&Item::change_context_processor, 0,
- (uchar*) 0);
+ func_expr->walk(&Item::change_context_processor, 0, 0);
#endif
DBUG_RETURN(result);
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 3bd308d6d72..bb68c44087b 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -466,8 +466,7 @@ fix_inner_refs(THD *thd, List<Item> &all_fields, SELECT_LEX *select,
List_iterator_fast <Item_outer_ref> ref_it(select->inner_refs_list);
for (ORDER *group= select->join->group_list; group; group= group->next)
{
- (*group->item)->walk(&Item::check_inner_refs_processor,
- TRUE, (uchar *) &ref_it);
+ (*group->item)->walk(&Item::check_inner_refs_processor, TRUE, &ref_it);
}
while ((ref= ref_it++))
@@ -1167,7 +1166,7 @@ JOIN::optimize_inner()
conversion happened (which done in the same way.
*/
if (select_lex->first_cond_optimization &&
- conds && conds->walk(&Item::exists2in_processor, 0, (uchar *)thd))
+ conds && conds->walk(&Item::exists2in_processor, 0, thd))
DBUG_RETURN(1);
/*
TODO
@@ -1175,7 +1174,7 @@ JOIN::optimize_inner()
for (TABLE_LIST *tbl= tables_list; tbl; tbl= tbl->next_local)
{
if (tbl->on_expr &&
- tbl->on_expr->walk(&Item::exists2in_processor, 0, (uchar *)thd))
+ tbl->on_expr->walk(&Item::exists2in_processor, 0, thd))
DBUG_RETURN(1);
}
*/
@@ -5394,8 +5393,7 @@ void count_cond_for_nj(SELECT_LEX *sel, TABLE_LIST *nested_join_table)
count_cond_for_nj(sel, table);
}
if (nested_join_table->on_expr)
- nested_join_table->on_expr->walk(&Item::count_sargable_conds,
- 0, (uchar*) sel);
+ nested_join_table->on_expr->walk(&Item::count_sargable_conds, 0, sel);
}
@@ -5436,12 +5434,11 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
sel->cond_count= 0;
sel->between_count= 0;
if (cond)
- cond->walk(&Item::count_sargable_conds, 0, (uchar*) sel);
+ cond->walk(&Item::count_sargable_conds, 0, sel);
for (i=0 ; i < tables ; i++)
{
if (*join_tab[i].on_expr_ref)
- (*join_tab[i].on_expr_ref)->walk(&Item::count_sargable_conds,
- 0, (uchar*) sel);
+ (*join_tab[i].on_expr_ref)->walk(&Item::count_sargable_conds, 0, sel);
}
{
List_iterator<TABLE_LIST> li(*join_tab->join->join_list);
@@ -5806,7 +5803,7 @@ add_group_and_distinct_keys(JOIN *join, JOIN_TAB *join_tab)
{ /* Collect all query fields referenced in the GROUP clause. */
for (cur_group= join->group_list; cur_group; cur_group= cur_group->next)
(*cur_group->item)->walk(&Item::collect_item_field_processor, 0,
- (uchar*) &indexed_fields);
+ &indexed_fields);
}
else if (join->select_distinct)
{ /* Collect all query fields referenced in the SELECT clause. */
@@ -5814,8 +5811,7 @@ add_group_and_distinct_keys(JOIN *join, JOIN_TAB *join_tab)
List_iterator<Item> select_items_it(select_items);
Item *item;
while ((item= select_items_it++))
- item->walk(&Item::collect_item_field_processor, 0,
- (uchar*) &indexed_fields);
+ item->walk(&Item::collect_item_field_processor, 0, &indexed_fields);
}
else if (join->tmp_table_param.sum_func_count &&
is_indexed_agg_distinct(join, &indexed_fields))
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 87b836f40d9..406c95fa755 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -325,9 +325,9 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
order=order->next)
{
(*order->item)->walk(&Item::change_context_processor, 0,
- (uchar*) &fake_select_lex->context);
+ &fake_select_lex->context);
(*order->item)->walk(&Item::set_fake_select_as_master_processor, 0,
- (uchar*) fake_select_lex);
+ fake_select_lex);
}
}
@@ -560,8 +560,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
ORDER *ord;
Item_func::Functype ft= Item_func::FT_FUNC;
for (ord= global_parameters()->order_list.first; ord; ord= ord->next)
- if ((*ord->item)->walk (&Item::find_function_processor, FALSE,
- (uchar *) &ft))
+ if ((*ord->item)->walk (&Item::find_function_processor, FALSE, &ft))
{
my_error (ER_CANT_USE_OPTION_HERE, MYF(0), "MATCH()");
goto err;
diff --git a/sql/table.cc b/sql/table.cc
index d1508751fb3..98f2f755c02 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2598,8 +2598,7 @@ static bool fix_vcol_expr(THD *thd,
/* Check that we are not refering to any not yet initialized fields */
if (field)
{
- if (func_expr->walk(&Item::check_field_expression_processor, 0,
- (uchar*) field))
+ if (func_expr->walk(&Item::check_field_expression_processor, 0, field))
goto end;
}
@@ -2611,7 +2610,7 @@ static bool fix_vcol_expr(THD *thd,
Item::vcol_func_processor_result res;
res.errors= 0;
- error= func_expr->walk(&Item::check_vcol_func_processor, 0, (uchar*) &res);
+ error= func_expr->walk(&Item::check_vcol_func_processor, 0, &res);
if (error || (res.errors & VCOL_IMPOSSIBLE))
{
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0), res.name,
@@ -6127,8 +6126,7 @@ void TABLE::mark_columns_used_by_index_no_reset(uint index,
if (key_part->field->vcol_info &&
key_part->field->vcol_info->expr_item)
key_part->field->vcol_info->
- expr_item->walk(&Item::register_field_in_bitmap,
- 1, (uchar *) bitmap);
+ expr_item->walk(&Item::register_field_in_bitmap, 1, bitmap);
}
}
@@ -6462,7 +6460,7 @@ bool TABLE::mark_virtual_col(Field *field)
{
Item *vcol_item= field->vcol_info->expr_item;
DBUG_ASSERT(vcol_item);
- vcol_item->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+ vcol_item->walk(&Item::register_field_in_read_map, 1, 0);
}
return res;
}
@@ -6517,7 +6515,7 @@ void TABLE::mark_virtual_columns_for_write(bool insert_fl)
bitmap_clear_all(&tmp_set);
save_read_set= read_set;
read_set= &tmp_set;
- vcol_item->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+ vcol_item->walk(&Item::register_field_in_read_map, 1, 0);
read_set= save_read_set;
bitmap_intersect(&tmp_set, write_set);
mark_fl= !bitmap_is_clear_all(&tmp_set);
@@ -6552,7 +6550,7 @@ void TABLE::mark_columns_used_by_check_constraints(void)
read_set= s->check_set;
for (Virtual_column_info **chk= check_constraints ; *chk ; chk++)
- (*chk)->expr_item->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+ (*chk)->expr_item->walk(&Item::register_field_in_read_map, 1, 0);
read_set= save_read_set;
s->check_set_initialized= 1;
@@ -6583,7 +6581,7 @@ void TABLE::mark_default_fields_for_write(bool is_insert)
{
bitmap_set_bit(write_set, field->field_index);
field->default_value->expr_item->
- walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
+ walk(&Item::register_field_in_read_map, 1, 0);
}
}
else if ((is_insert && field->has_insert_default_function()) ||