mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Alter thr_timer to allow server startup past 2038
In previous commits, changes were made to use the entire 32 bit unsigned range in order to support timestamps past 2038 on 64 bit systems. Without changing set_max_time on thr_timer to also match this new range, the server will crash when attempting to startup past 2038-01-19. Like the previous commits, this only applies to 64 bit systems. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
committed by
Sergei Golubchik
parent
84331c5bd7
commit
dcbc526a20
@@ -35,9 +35,15 @@ static mysql_cond_t COND_timer;
|
||||
static QUEUE timer_queue;
|
||||
pthread_t timer_thread;
|
||||
|
||||
#if SIZEOF_VOIDP == 4
|
||||
/* 32 bit system, using old timestamp */
|
||||
#define set_max_time(abs_time) \
|
||||
{ (abs_time)->MY_tv_sec= INT_MAX32; (abs_time)->MY_tv_nsec= 0; }
|
||||
|
||||
#else
|
||||
/* 64 bit system. Use 4 byte unsigned timestamp */
|
||||
#define set_max_time(abs_time) \
|
||||
{ (abs_time)->MY_tv_sec= UINT_MAX32; (abs_time)->MY_tv_nsec= 0; }
|
||||
#endif
|
||||
|
||||
static void *timer_handler(void *arg __attribute__((unused)));
|
||||
|
||||
|
Reference in New Issue
Block a user