summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-07-15 21:51:36 +0400
committerunknown <evgen@moonbone.local>2007-07-15 21:51:36 +0400
commit6e078ff5433080699416ed473a332395d48a1bfa (patch)
tree4ef5486e94cf10e1661efa4c4a3fa315f4093b7f /sql/item_cmpfunc.h
parent4b7e6a3842600ca3dc0bbf242bdc6c2b2fb75ab5 (diff)
downloadmariadb-git-6e078ff5433080699416ed473a332395d48a1bfa.tar.gz
Extended fix for the bug#29555.
The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator. mysql-test/t/type_time.test: Extended test case for the bug#29555. mysql-test/r/type_time.result: Extended test case for the bug#29555. sql/item_cmpfunc.cc: Extended fix for the bug#29555. The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. sql/item_cmpfunc.h: Extended fix for the bug#29555. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 79091b9c87d..9afc0507817 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -42,6 +42,8 @@ class Arg_comparator: public Sql_alloc
bool is_nulls_eq; // TRUE <=> compare for the EQUAL_FUNC
enum enum_date_cmp_type { CMP_DATE_DFLT= 0, CMP_DATE_WITH_DATE,
CMP_DATE_WITH_STR, CMP_STR_WITH_DATE };
+ ulonglong (*get_value_func)(THD *thd, Item ***item_arg, Item **cache_arg,
+ Item *warn_item, bool *is_null);
public:
DTCollation cmp_collation;