diff options
author | evgen@moonbone.local <> | 2006-01-11 22:49:43 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2006-01-11 22:49:43 +0300 |
commit | 605f62fce80ed89c2720f697ba17f381ec28c91a (patch) | |
tree | 6b8d0de32ad9d2874c9c9803e328edad542e33fa /sql/item_cmpfunc.h | |
parent | c34595c9754c4778f8c27695eb81e13d4707d6c1 (diff) | |
download | mariadb-git-605f62fce80ed89c2720f697ba17f381ec28c91a.tar.gz |
Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong
select result
Item equal objects are employed only at the optimize phase. Usually they are not
supposed to be evaluated. Yet in some cases we call the method val_int() for
them. Here we have to take care of restricting the predicate such an object
represents f1=f2= ...=fn to the projection of known fields fi1=...=fik.
Added a check for field's table being const in Item_equal::val_int().
If the field's table is not const val_int() just skips that field when
evaluating Item_equal.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index bfd32223d4c..89d117ee4ec 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1150,6 +1150,11 @@ public: are deleted in the end of execution. All changes made to these objects need not be registered in the list of changes of the parse tree and do not harm PS/SP re-execution. + + Item equal objects are employed only at the optimize phase. Usually they are + not supposed to be evaluated. Yet in some cases we call the method val_int() + for them. We have to take care of restricting the predicate such an + object represents f1=f2= ...=fn to the projection of known fields fi1=...=fik. */ class Item_equal: public Item_bool_func |