summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index bd1e8b72157..a222335cf97 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -4507,7 +4507,8 @@ Item_cond::fix_fields(THD *thd, Item **ref)
was: <field>
become: <field> = 1
*/
- if (item->type() == FIELD_ITEM)
+ Item::Type type= item->type();
+ if (type == Item::FIELD_ITEM || type == Item::REF_ITEM)
{
Query_arena backup, *arena;
Item *new_item;