diff options
author | Igor Babaev <igor@askmonty.org> | 2011-05-19 18:28:38 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-05-19 18:28:38 -0700 |
commit | 016a09cb7d40236c3530ae4c5c4815072aa8dacb (patch) | |
tree | 84f543c79596e3b48a96f3cc344ec02dc6bce829 /sql/sql_string.h | |
parent | 20c9084deb6075f675ebabc5fd073f8ff93130e2 (diff) | |
download | mariadb-git-016a09cb7d40236c3530ae4c5c4815072aa8dacb.tar.gz |
Fixed LP bug #777745.
Fields belonging to views in general cannot be substituted for
equal items, in particular for constants, because all references
to a view field refer to the same Item_field object while they
could be used in different OR parts of the where condition and
belong to different equivalence classes (to different Item_equals).
That's why substitution for equal items in any context is allowed
only in place of Item_direct_view_ref objects, but not in place of
Item_fields these objects refer to.
Due to some erroneous code in the patch for bug 717577 substitution
for view fields were allowed in some context.This could lead
to wrong results returned by queries using views.
The fix prohibits substitution of view fields for equal items
in any context.
The patch also changes slightly the compile method for the Item_func
class. Now if the analyze method returns NULL in his parameter the
compile method is not called for the arguments of the function
at all. A similar change was made for the Item_ref class.
Diffstat (limited to 'sql/sql_string.h')
0 files changed, 0 insertions, 0 deletions