summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-26 22:42:48 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-30 11:43:02 +0200
commited77ee1aab1c41584bccfc62bee77d7c4d9af8d4 (patch)
treeed4d896e4e06db8e0bfa9bc075f0dd39fdda55d6 /sql/item_subselect.cc
parente8bdb73adee78253424fbb1ff782ad12700939a1 (diff)
downloadmariadb-git-ed77ee1aab1c41584bccfc62bee77d7c4d9af8d4.tar.gz
cleanup: change Item::walk() to take void* not uchar*
and remove all related casts to uchar* also remove a couple of unused methods
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc23
1 files changed, 11 insertions, 12 deletions
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)))