diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 19:09:50 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 19:09:50 +0300 |
commit | 86dc0f57857ce9e5f1491fdd9a163779040ccff1 (patch) | |
tree | a72fd21da4beb2547a48f7e4a93ecd78813a6252 /sql/sys_vars.cc | |
parent | aad940865857138ead2face0de5fa9cf35b60166 (diff) | |
parent | ac738d8265b665dc90be0a7977468096ee463c78 (diff) | |
download | mariadb-git-86dc0f57857ce9e5f1491fdd9a163779040ccff1.tar.gz |
merge
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index c6481891ca1..5f75dd4adf5 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2321,6 +2321,28 @@ static ulonglong read_timestamp(THD *thd) { return (ulonglong) thd->start_time; } + + +static bool check_timestamp(sys_var *self, THD *thd, set_var *var) +{ + time_t val; + + if (!var->value) + return FALSE; + + var->save_result.ulonglong_value= var->value->val_int(); + val= (time_t) var->save_result.ulonglong_value; + if (val < (time_t) MY_TIME_T_MIN || val > (time_t) MY_TIME_T_MAX) + { + my_message(ER_UNKNOWN_ERROR, + "This version of MySQL doesn't support dates later than 2038", + MYF(0)); + return TRUE; + } + return FALSE; +} + + static Sys_var_session_special Sys_timestamp( "timestamp", "Set the time for this client", sys_var::ONLY_SESSION, NO_CMD_LINE, |