1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')

This commit is contained in:
Alexander Barkov
2013-09-16 10:14:41 +04:00
parent 996f6194c6
commit 5d7b97b89e
3 changed files with 102 additions and 1 deletions

View File

@@ -2435,7 +2435,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),