summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2005-04-25 11:25:40 +0400
committerdlenev@brandersnatch.localdomain <>2005-04-25 11:25:40 +0400
commita4a4c5cb69671329d863e5af04fe114734e731e5 (patch)
tree83abf2fed8b082c3836ceef995a6b9060a674861 /sql/item_timefunc.cc
parent5b74b6fd3bbc9b9bb2a66e9a51692525085f0017 (diff)
downloadmariadb-git-a4a4c5cb69671329d863e5af04fe114734e731e5.tar.gz
Fix for func_sapdb failures on 64-bit platforms (aka Bug #10040
"'func_sapdb' fails on 64bit build hosts")
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 6715930bc61..23cd9c7ced2 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -800,14 +800,14 @@ static bool calc_time_diff(TIME *l_time1, TIME *l_time2, int l_sign,
We should check it before calc_time_diff call.
*/
if (l_time1->time_type == MYSQL_TIMESTAMP_TIME) // Time value
- days= l_time1->day - l_sign*l_time2->day;
+ days= (long)l_time1->day - l_sign * (long)l_time2->day;
else
{
days= calc_daynr((uint) l_time1->year,
(uint) l_time1->month,
(uint) l_time1->day);
if (l_time2->time_type == MYSQL_TIMESTAMP_TIME)
- days-= l_sign*l_time2->day;
+ days-= l_sign * (long)l_time2->day;
else
days-= l_sign*calc_daynr((uint) l_time2->year,
(uint) l_time2->month,