summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-02-23 17:33:11 +0100
committerunknown <msvensson@pilot.blaudden>2007-02-23 17:33:11 +0100
commitd8ba8b8c985d256cf607e6e1a86be6b1fc533673 (patch)
treea63d78e9b3f0c439c75d9e419dfadcd8a1c55a15 /include/my_time.h
parent44994c9dfc99293f0be30334e407a212747b8eae (diff)
downloadmariadb-git-d8ba8b8c985d256cf607e6e1a86be6b1fc533673.tar.gz
Bug#26536 func_time failure on vm-win2003-64-b, occurs every time
- Avoid overflow in sec_since_epoch by shifting the time back 2 days for times close to the maximum range of my_time_t - Improve comment about why we need my_time_t - Patch will also fix timezone2.test include/my_time.h: Improve comment for my_time_t, especially that we require it to be at least a 32bit unsigned type sql/tztime.cc: - Add assert in sec_since_epoch to guard it against broken down time values that would cause overflow in my_time_t on systems with 32 bit my_time_t - Avoid overflow in sec_since_epoch by "shifting" the broken down time back 2 days for times that are near the max value.c
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/my_time.h b/include/my_time.h
index 14726d3a01d..3c8f4274409 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -30,7 +30,13 @@ extern uchar days_in_month[];
/*
Portable time_t replacement.
- Should be signed and hold seconds for 1902-2038 range.
+ Should be signed and hold seconds for 1902 -- 2038-01-19 range
+ i.e at least a 32bit variable
+
+ Using the system built in time_t is not an option as
+ we rely on the above requirements in the time functions
+
+ For example QNX has an unsigned time_t type
*/
typedef long my_time_t;