diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-09-22 17:52:05 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-09-28 21:12:48 +0200 |
commit | 9ff9acb3079b1c48f5be0f0a689cbbdda82b4c0e (patch) | |
tree | bcc314b7cd1db32f6d61a400bcea8d81c409d4f0 /sql | |
parent | d5dfa0f1c20614ca083a0c4f841534f2f68808dd (diff) | |
download | mariadb-git-9ff9acb3079b1c48f5be0f0a689cbbdda82b4c0e.tar.gz |
MDEV-10716: Assertion `real_type() != FIELD_ITEM' failed in Item_ref::build_equal_items(THD*, COND_EQUAL*, bool, COND_EQUAL**)
Degenerated condition in AND should be treated in the same
way as in WHERE/HAVING alone (i.e reference should be
processed as well as fields)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 3 |
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; |