summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2006-06-20 15:40:10 +0400
committerunknown <evgen@moonbone.local>2006-06-20 15:40:10 +0400
commit739248f9c7d4257eb81658d4c6499186d5347e16 (patch)
treec58b29eeaa2e854ec37618dc4b2a0adfeaeaeaae /sql/item_cmpfunc.cc
parentac2c480f26d88c35f8a527ea8ce3640e827fc0d1 (diff)
downloadmariadb-git-739248f9c7d4257eb81658d4c6499186d5347e16.tar.gz
item_cmpfunc.cc:
After merge fix sql/item_cmpfunc.cc: After merge fix
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 165dab5e43a..6a27d08611e 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -179,6 +179,10 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
for (i= 0; i < nitems ; i++)
{
Item_result result= items[i]->result_type();
+ /*
+ Use INT_RESULT as result type for DATE/TIME fields/functions and
+ for constants successfully converted to DATE/TIME
+ */
if (field &&
((!items[i]->const_item() && items[i]->result_as_longlong()) ||
(items[i]->const_item() && convert_constant_item(thd, field,