@@ -2560,7 +2560,7 @@ int JOIN::optimize_stage2()
2560
2560
if (!conds && outer_join)
2561
2561
{
2562
2562
/* Handle the case where we have an OUTER JOIN without a WHERE */
2563
- conds= (Item*) & Item_true;
2563
+ conds= (Item*) Item_true;
2564
2564
}
2565
2565
2566
2566
if (impossible_where)
@@ -2730,9 +2730,7 @@ int JOIN::optimize_stage2()
2730
2730
2731
2731
if (conds && const_table_map != found_const_table_map &&
2732
2732
(select_options & SELECT_DESCRIBE))
2733
- {
2734
- conds= (Item*) &Item_false;
2735
- }
2733
+ conds= (Item*) Item_false;
2736
2734
2737
2735
/* Cache constant expressions in WHERE, HAVING, ON clauses. */
2738
2736
cache_const_exprs();
@@ -3049,7 +3047,7 @@ int JOIN::optimize_stage2()
3049
3047
having= having->remove_eq_conds(thd, &select_lex->having_value, true);
3050
3048
if (select_lex->having_value == Item::COND_FALSE)
3051
3049
{
3052
- having= (Item*) & Item_false;
3050
+ having= (Item*) Item_false;
3053
3051
zero_result_cause= "Impossible HAVING noticed after reading const tables";
3054
3052
error= 0;
3055
3053
select_lex->mark_const_derived(zero_result_cause);
@@ -5625,7 +5623,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
5625
5623
if (join->cond_value == Item::COND_FALSE)
5626
5624
{
5627
5625
join->impossible_where= true;
5628
- conds= (Item*) & Item_false;
5626
+ conds= (Item*) Item_false;
5629
5627
}
5630
5628
5631
5629
join->cond_equal= NULL;
@@ -11872,7 +11870,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
11872
11870
below to check if we should use 'quick' instead.
11873
11871
*/
11874
11872
DBUG_PRINT("info", ("Item_int"));
11875
- tmp= (Item*) & Item_true;
11873
+ tmp= (Item*) Item_true;
11876
11874
}
11877
11875
11878
11876
}
@@ -15455,7 +15453,7 @@ COND *Item_cond_and::build_equal_items(THD *thd,
15455
15453
if (!cond_args->elements &&
15456
15454
!cond_equal.current_level.elements &&
15457
15455
!eq_list.elements)
15458
- return (Item*) & Item_true;
15456
+ return (Item*) Item_true;
15459
15457
15460
15458
List_iterator_fast<Item_equal> it(cond_equal.current_level);
15461
15459
while ((item_equal= it++))
@@ -15562,7 +15560,7 @@ COND *Item_func_eq::build_equal_items(THD *thd,
15562
15560
Item_equal *item_equal;
15563
15561
int n= cond_equal.current_level.elements + eq_list.elements;
15564
15562
if (n == 0)
15565
- return (Item*) & Item_true;
15563
+ return (Item*) Item_true;
15566
15564
else if (n == 1)
15567
15565
{
15568
15566
if ((item_equal= cond_equal.current_level.pop()))
@@ -15966,7 +15964,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
15966
15964
List<Item> eq_list;
15967
15965
Item_func_eq *eq_item= 0;
15968
15966
if (((Item *) item_equal)->const_item() && !item_equal->val_int())
15969
- return (Item*) & Item_false;
15967
+ return (Item*) Item_false;
15970
15968
Item *item_const= item_equal->get_const();
15971
15969
Item_equal_fields_iterator it(*item_equal);
15972
15970
Item *head;
@@ -16111,7 +16109,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
16111
16109
switch (eq_list.elements)
16112
16110
{
16113
16111
case 0:
16114
- res= cond ? cond : (Item*) & Item_true;
16112
+ res= cond ? cond : (Item*) Item_true;
16115
16113
break;
16116
16114
case 1:
16117
16115
if (!cond || cond->is_bool_literal())
@@ -17949,7 +17947,7 @@ Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
17949
17947
17950
17948
*/
17951
17949
17952
- Item *item0= (Item*) & Item_false;
17950
+ Item *item0= (Item*) Item_false;
17953
17951
Item *eq_cond= new(thd->mem_root) Item_func_eq(thd, args[0], item0);
17954
17952
if (!eq_cond)
17955
17953
return this;
@@ -29630,7 +29628,7 @@ void JOIN::make_notnull_conds_for_range_scans()
29630
29628
Found a IS NULL conjunctive predicate for a null-rejected field
29631
29629
in the WHERE clause
29632
29630
*/
29633
- conds= (Item*) & Item_false;
29631
+ conds= (Item*) Item_false;
29634
29632
cond_equal= 0;
29635
29633
impossible_where= true;
29636
29634
DBUG_VOID_RETURN;
@@ -29653,7 +29651,7 @@ void JOIN::make_notnull_conds_for_range_scans()
29653
29651
Found a IS NULL conjunctive predicate for a null-rejected field
29654
29652
of the inner table of an outer join with ON expression tbl->on_expr
29655
29653
*/
29656
- tbl->on_expr= (Item*) & Item_false;
29654
+ tbl->on_expr= (Item*) Item_false;
29657
29655
}
29658
29656
}
29659
29657
}
@@ -29804,7 +29802,7 @@ void build_notnull_conds_for_inner_nest_of_outer_join(JOIN *join,
29804
29802
if (used_tables &&
29805
29803
build_notnull_conds_for_range_scans(join, nest_tbl->on_expr, used_tables))
29806
29804
{
29807
- nest_tbl->on_expr= (Item*) & Item_false;
29805
+ nest_tbl->on_expr= (Item*) Item_false;
29808
29806
}
29809
29807
29810
29808
li.rewind();
@@ -29818,7 +29816,7 @@ void build_notnull_conds_for_inner_nest_of_outer_join(JOIN *join,
29818
29816
}
29819
29817
else if (build_notnull_conds_for_range_scans(join, tbl->on_expr,
29820
29818
tbl->table->map))
29821
- tbl->on_expr= (Item*) & Item_false;
29819
+ tbl->on_expr= (Item*) Item_false;
29822
29820
}
29823
29821
}
29824
29822
}
0 commit comments