1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Extends 64 bit windows to support timestamps up to year 2106.

MDEV-32188 make TIMESTAMP use whole 32-bit unsigned range

This is done by changing my_time_t from long to unsigned long.
The effect of this is that on windows compling old clients may
get warnings of if they compare my_time_t with as signed variable.

Other things
- Removed my_time_t from include/*.pp files as it is different on windows
  and linux.
- Changed do_abi_check.cmake to first print abi_check and then the
  conflicting file (this makes it easier to find the cause of the error).
This commit is contained in:
Monty
2023-09-18 12:05:41 +03:00
committed by Sergei Golubchik
parent dfdedd46e4
commit b8ffd99cee
14 changed files with 60 additions and 46 deletions

View File

@@ -19,13 +19,26 @@
/*
Portable time_t replacement.
For 32 bit systems holds seconds for 1970 - 2038-01-19 range
For 64 bit systems (where long is 64 bit) holds seconds for 1970 - 2106
For 32 bit systems holds seconds for 1970 - 2038-01-19
For 64 bit systems holds seconds for 1970 - 2106-02-07
Using the system built in time_t is not an option as
we rely on the above requirements in the time functions
*/
#ifndef MYSQL_ABI_CHECK
/*
long is 64bit on all 64bit systems, except Windows where it is 32 bit.
long is 32bit on all 32bit systems.
The following code ensures that my_time_t is 64 bit on all 64 bit
systems.
*/
#ifdef _WIN64
typedef long long my_time_t;
#else
typedef long my_time_t;
#endif
#endif /* MYSQL_ABI_CHECK */
/*
Time declarations shared between the server and client API: