diff options
author | monty@hundin.mysql.fi <> | 2002-05-15 01:01:26 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-05-15 01:01:26 +0300 |
commit | 14b55bcc72554f3f356df4e7b1d8e7c8244de959 (patch) | |
tree | 3dc97e13fe4695f7d461248693b9267cf1bcc638 /sql/item.h | |
parent | 4a634059883d561bdc931ea67f6e54e6478e8bde (diff) | |
download | mariadb-git-14b55bcc72554f3f356df4e7b1d8e7c8244de959.tar.gz |
Fixed bug in datetime range optimization
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index 41b897956db..b8903756027 100644 --- a/sql/item.h +++ b/sql/item.h @@ -342,6 +342,25 @@ public: }; +/* + The following class is used to optimize comparing of date columns + We need to save the original item, to be able to set the field to the + original value in 'opt_range'. +*/ + +class Item_int_with_ref :public Item_int +{ + Item *ref; +public: + Item_int_with_ref(longlong i, Item *ref_arg) :Item_int(i), ref(ref_arg) + {} + bool save_in_field(Field *field) + { + return ref->save_in_field(field); + } +}; + + #include "item_sum.h" #include "item_func.h" #include "item_cmpfunc.h" |