diff options
author | unknown <igor@rurik.mysql.com> | 2006-03-27 18:28:55 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-03-27 18:28:55 -0800 |
commit | b0654461dfbde40f8419b0af1f3be17217638bd2 (patch) | |
tree | 2f3e939f12e45c4e0568bb5cb29eec70675b0ef1 /sql | |
parent | ce494285fc8e22092d7521e04f161b2cbf46139a (diff) | |
download | mariadb-git-b0654461dfbde40f8419b0af1f3be17217638bd2.tar.gz |
Fixed bug #18386.
An invalid assertion in Item_direct_view_ref::eq caused
an assertion abort in the debug version.
mysql-test/r/view.result:
Added a test case for bug #18386.
mysql-test/t/view.test:
Added a test case for bug #18386.
sql/item.cc:
Fixed bug #18386.
An invalid assertion in Item_direct_view_ref::eq caused
an assertion abort in the debug version.
Changed the assertion.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/item.cc b/sql/item.cc index c48bf19a88b..8ffe7a6b2fd 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5076,11 +5076,8 @@ bool Item_direct_view_ref::fix_fields(THD *thd, Item **reference) DESCRIPTION A view column reference is considered equal to another column reference if the second one is a view column and if both column - references point to the same field. For views 'same field' means - the same Item_field object in the view translation table, where - the view translation table contains all result columns of the - view. This definition ensures that view columns are resolved - in the same manner as table columns. + references resolve to the same item. It is assumed that both + items are of the same type. RETURN TRUE Referenced item is equal to given item @@ -5096,8 +5093,8 @@ bool Item_direct_view_ref::eq(const Item *item, bool binary_cmp) const if (item_ref->ref_type() == VIEW_REF) { Item *item_ref_ref= *(item_ref->ref); - DBUG_ASSERT((*ref)->real_item()->type() == FIELD_ITEM && - (item_ref_ref->real_item()->type() == FIELD_ITEM)); + DBUG_ASSERT((*ref)->real_item()->type() == + item_ref_ref->real_item()->type()); return ((*ref)->real_item() == item_ref_ref->real_item()); } } |