diff --git a/sql/item.cc b/sql/item.cc index d284af2b9f1..b2a1e44cfcc 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1768,7 +1768,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) Item** res= find_item_in_list(this, thd->lex->current_select->item_list, &counter, REPORT_EXCEPT_NOT_FOUND, ¬_used); - if (res != not_found_item && (*res)->type() == Item::FIELD_ITEM) + if (res != (Item **)not_found_item && (*res)->type() == Item::FIELD_ITEM) { set_field((*((Item_field**)res))->field); return 0;