summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2008-11-26 09:28:17 +0100
committerTatiana A. Nurnberg <azundris@mysql.com>2008-11-26 09:28:17 +0100
commitae0c6a949c78139d1d8965cb8caa811f83cb8a94 (patch)
tree89fc8f73a3e600368596aa2d7d21302f2ee7f34b /sql/item_timefunc.h
parent03a27c45cd6c3df8a18b2c800489b31446edd114 (diff)
downloadmariadb-git-ae0c6a949c78139d1d8965cb8caa811f83cb8a94.tar.gz
Bug#37553: MySql Error Compare TimeDiff & Time
We pretended that TIMEDIFF() would always return positive results; this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0) type that rendered a negative result, but still gave false in comparison. We also inadvertantly dropped the sign when converting times to decimal. CAST(time AS DECIMAL) handles signs of the times correctly. TIMEDIFF() marked up as signed. Time/date comparison code switched to signed for clarity.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 7960c03d2e5..81a6c3e98bd 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -408,6 +408,7 @@ public:
{
return save_time_in_field(field);
}
+ bool result_as_longlong() { return TRUE; }
};