summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-05-21 18:41:56 +0200
committerSergei Golubchik <sergii@pisem.net>2011-05-21 18:41:56 +0200
commitdda9577d553c9969415bc5f3d45f287e3dd6de39 (patch)
tree06124b3cf34e6947f74d357f185626d583e845dc /sql/item_func.cc
parent7c459960ece917dcdc4dedc9f3dd0c9f5d07c3b8 (diff)
downloadmariadb-git-dda9577d553c9969415bc5f3d45f287e3dd6de39.tar.gz
comments
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 870a481ce85..5a8e8a4defd 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2282,6 +2282,14 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
{
longlong UNINIT_VAR(min_max);
DBUG_ASSERT(fixed == 1);
+
+ /*
+ just like ::val_int() method of an string item can be called,
+ for example, SELECT CONCAT("10", "12") + 1,
+ ::get_date() can be called for non-temporal values,
+ for example, SELECT MONTH(GREATEST("2011-11-21", "2010-10-09"))
+
+ */
if (!compare_as_dates)
return Item_func::get_date(ltime, fuzzy_date);