diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 20:25:31 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 20:25:31 +0200 |
commit | 867296c3edc4502093f7b706e7ac4c1670aa9515 (patch) | |
tree | afcc8157b0b71a28edbcca6b862e6ca854fc743c /sql/item_cmpfunc.h | |
parent | 0d5adca0de0a51b1f0bd49045fc4062eac7d1d25 (diff) | |
parent | 6131d708e889cd4f93490c22bfee00d0728edfd2 (diff) | |
download | mariadb-git-867296c3edc4502093f7b706e7ac4c1670aa9515.tar.gz |
5.3 merge
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 95d797c62cf..38dbc2901c6 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1693,9 +1693,16 @@ class Item_equal: public Item_bool_func as datetimes. The comparator is used only if compare_as_dates=TRUE */ Arg_comparator cmp; + + /* + For Item_equal objects inside an OR clause: one of the fields that were + used in the original equality. + */ + Item_field *context_field; public: inline Item_equal() - : Item_bool_func(), with_const(FALSE), eval_item(0), cond_false(0) + : Item_bool_func(), with_const(FALSE), eval_item(0), cond_false(0), + context_field(NULL) { const_item_cache=0 ;} Item_equal(Item *f1, Item *f2, bool with_const_item); Item_equal(Item_equal *item_equal); @@ -1722,6 +1729,8 @@ public: Item *transform(Item_transformer transformer, uchar *arg); virtual void print(String *str, enum_query_type query_type); CHARSET_INFO *compare_collation(); + + void set_context_field(Item_field *ctx_field) { context_field= ctx_field; } friend class Item_equal_fields_iterator; friend Item *eliminate_item_equal(COND *cond, COND_EQUAL *upper_levels, Item_equal *item_equal); |