summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-10-09 05:20:05 +0400
committerAlexander Barkov <bar@mariadb.com>2018-10-09 07:50:24 +0400
commitc57bbb259684069e87cbae12c7c04a4284af15c3 (patch)
tree91f50f373ad602aef5525b790750e4374377f845 /sql/sql_time.cc
parentf3761539b32e2f82d93dc3c74d7b16a3d5f93063 (diff)
downloadmariadb-git-c57bbb259684069e87cbae12c7c04a4284af15c3.tar.gz
MDEV-17400 The result of TIME('42949672965959-01') depends on architecture
- Fixing portabibily problems in sql-common/my_time.c (and additionally in sql/sql_time.cc) - Re-enabling func_time.test Now all new chunks added in MDEV-17351 work fine on all platforms.
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 90803b48539..c3019668497 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -1117,10 +1117,10 @@ calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2,
}
microseconds= ((longlong)days * SECONDS_IN_24H +
- (longlong)(l_time1->hour*3600L +
+ (longlong)(l_time1->hour*3600LL +
l_time1->minute*60L +
l_time1->second) -
- l_sign*(longlong)(l_time2->hour*3600L +
+ l_sign*(longlong)(l_time2->hour*3600LL +
l_time2->minute*60L +
l_time2->second)) * 1000000LL +
(longlong)l_time1->second_part -