diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 16:21:19 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 16:21:19 +0300 |
commit | 121e04732ea3b5edf36335f827cc5bcb08fb7665 (patch) | |
tree | 84dac453baa2a878b6dcb1c5ece486502e0d2180 /sql/set_var.h | |
parent | bd9fa7da26a2d37d8fafd26d453ed62e4d97f85f (diff) | |
download | mariadb-git-121e04732ea3b5edf36335f827cc5bcb08fb7665.tar.gz |
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.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 5fb883e8b86..9945c69cac0 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -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; } |