diff options
author | Alexander Barkov <bar@mariadb.org> | 2013-08-08 13:41:21 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2013-08-08 13:41:21 +0400 |
commit | cafe9d13f64924c17a4fc67704d25ee78f49cb35 (patch) | |
tree | ec1733e3edb8a6b87afd82014a0d014f2222e637 /sql/item_timefunc.cc | |
parent | 62484d2e23e15831260a3874748f58c6fda2f346 (diff) | |
parent | e9db0da787996c1244f579bbc313c82ecde95d2f (diff) | |
download | mariadb-git-cafe9d13f64924c17a4fc67704d25ee78f49cb35.tar.gz |
Merge from 5.3
pending merges:
Alexander Barkov 2013-08-08 MDEV-4653 Wrong result for CONVERT_TZ(TIME('...
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 7bf0e25e848..c8aaf9a7cb3 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2032,7 +2032,9 @@ bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) { INTERVAL interval; - if (args[0]->get_date(ltime, 0) || + if (args[0]->get_date(ltime, + cached_field_type == MYSQL_TYPE_TIME ? + TIME_TIME_ONLY : 0) || get_interval_value(args[1], int_type, &interval)) return (null_value=1); @@ -2423,7 +2425,9 @@ bool Item_time_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) if (ltime->time_type != MYSQL_TIMESTAMP_TIME) ltime->year= ltime->month= ltime->day= 0; ltime->time_type= MYSQL_TIMESTAMP_TIME; - return 0; + return (fuzzy_date & TIME_TIME_ONLY) ? 0 : + (null_value= check_date_with_warn(ltime, fuzzy_date, + MYSQL_TIMESTAMP_ERROR)); } |