diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index c284e8b3bf4..13f09914ec6 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4341,7 +4341,7 @@ Item *Item_field::replace_equal_field(byte *arg) return const_item; } Item_field *subst= item_equal->get_first(); - if (subst && !field->eq(subst->field)) + if (subst && field->table != subst->field->table && !field->eq(subst->field)) return subst; } return this; |