summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 927e86398c2..b878da5661e 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -364,6 +364,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 "spatial.h"
#include "item_sum.h"
#include "item_func.h"