summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-09-16 10:51:03 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-09-16 10:51:03 +0400
commit2624022b537b0aa099e89cf2ed3eb41d9515948d (patch)
tree888ce94859b0f9dc6925b20b70aa311032f23c0b /sql/item_timefunc.cc
parentb8af3bd4d6b6bd92f8bf4eec132118a12483915c (diff)
parent5d7b97b89ec2073bd8dffead6adb895cf1b15adc (diff)
downloadmariadb-git-2624022b537b0aa099e89cf2ed3eb41d9515948d.tar.gz
Merge from 5.3
pending merges: Alexander Barkov 2013-09-16 MDEV-4843 Wrong data type for TIMESTAMP('200...
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 5288d4133e7..772bb5ac9ab 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2558,7 +2558,8 @@ void Item_func_add_time::fix_length_and_dec()
arg0_field_type= args[0]->field_type();
if (arg0_field_type == MYSQL_TYPE_DATE ||
arg0_field_type == MYSQL_TYPE_DATETIME ||
- arg0_field_type == MYSQL_TYPE_TIMESTAMP)
+ arg0_field_type == MYSQL_TYPE_TIMESTAMP ||
+ is_date)
{
cached_field_type= MYSQL_TYPE_DATETIME;
decimals= max(args[0]->temporal_precision(MYSQL_TYPE_DATETIME),