summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-09-10 10:08:11 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-09-10 10:08:11 +0400
commit8b5da9f73b4af8e5a11fdddc402da822d3df8d93 (patch)
treef798f6c91602a458e9fa36544e2cf6c3b2a6e0cc /sql/item_timefunc.cc
parent42f56557f59705aeec83a54f02399b04d52e9eea (diff)
parentc2b38529a9ca2ea09dfa73186d9350a0d6dcd6ac (diff)
downloadmariadb-git-8b5da9f73b4af8e5a11fdddc402da822d3df8d93.tar.gz
Merge from 5.3
pending merges: Alexander Barkov 2013-09-09 MDEV-4863 COALESCE(time_or_datetime) returns...
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index c8aaf9a7cb3..4e2b07fee08 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1435,12 +1435,8 @@ bool get_interval_value(Item *args,interval_type int_type, INTERVAL *interval)
void Item_temporal_func::fix_length_and_dec()
{
- static const uint max_time_type_width[5]=
- { MAX_DATETIME_WIDTH, MAX_DATETIME_WIDTH, MAX_DATE_WIDTH,
- MAX_DATETIME_WIDTH, MIN_TIME_WIDTH };
-
set_persist_maybe_null(1);
- max_length= max_time_type_width[mysql_type_to_time_type(field_type())+2];
+ max_length= mysql_temporal_int_part_length(field_type());
if (decimals)
{
if (decimals == NOT_FIXED_DEC)