diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-06-21 14:11:02 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-21 14:11:02 +0200 |
commit | c081c978a2c83b9dc9efa84414cf40232460987d (patch) | |
tree | b625b53c941b75d122ba21d7bf650016f78c9bd5 /sql/item_func.cc | |
parent | 1d21b22155242f604ab8e4a7b4ed92a422f61266 (diff) | |
parent | a482e76e65a4fee70479e877929381c86b1ec62f (diff) | |
download | mariadb-git-c081c978a2c83b9dc9efa84414cf40232460987d.tar.gz |
Merge branch '5.5' into bb-10.0
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index a4a2782c8c4..b637213bc2d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2939,12 +2939,13 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) } unpack_time(min_max, ltime); - if (compare_as_dates->field_type() == MYSQL_TYPE_DATE) + enum_field_types ftype= compare_as_dates->field_type(); + if (ftype == MYSQL_TYPE_DATE || ftype == MYSQL_TYPE_NEWDATE) { ltime->time_type= MYSQL_TIMESTAMP_DATE; ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0; } - else if (compare_as_dates->field_type() == MYSQL_TYPE_TIME) + else if (ftype == MYSQL_TYPE_TIME) { ltime->time_type= MYSQL_TIMESTAMP_TIME; ltime->hour+= (ltime->month * 32 + ltime->day) * 24; |