mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Bug #52315: utc_date() crashes when system time > year 2037
Some of the server implementations don't support dates later than 2038 due to the internal time type being 32 bit. Added checks so that the server will refuse dates that cannot be handled by either throwing an error when setting date at runtime or by refusing to start or shutting down the server if the system date cannot be stored in my_time_t.
This commit is contained in:
parent
bd9fa7da26
commit
121e04732e
7 changed files with 66 additions and 1 deletions
|
|
@ -536,6 +536,7 @@ class sys_var_timestamp :public sys_var
|
|||
{
|
||||
public:
|
||||
sys_var_timestamp(const char *name_arg) :sys_var(name_arg) {}
|
||||
bool check(THD *thd, set_var *var);
|
||||
bool update(THD *thd, set_var *var);
|
||||
void set_default(THD *thd, enum_var_type type);
|
||||
bool check_type(enum_var_type type) { return type == OPT_GLOBAL; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue