diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 17:10:22 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-04 17:10:22 +0300 |
commit | 1a101920f3fea89436727efb86a7efbe349f7bc5 (patch) | |
tree | e36c07742e17423e4748490721378b3ed78f54cf /sql/sql_parse.cc | |
parent | dcd9abee2e26d893834483eff461d7b8b0aa5270 (diff) | |
parent | 5321e49da6b2634d7f32a6a51da5900cb6f233cf (diff) | |
download | mariadb-git-1a101920f3fea89436727efb86a7efbe349f7bc5.tar.gz |
merge
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f28f8f1868a..7af263f62c5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -994,6 +994,19 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->enable_slow_log= TRUE; thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */ thd->set_time(); + if (!thd->is_valid_time()) + { + /* + If the time has got past 2038 we need to shut this server down + We do this by making sure every command is a shutdown and we + have enough privileges to shut the server down + + TODO: remove this when we have full 64 bit my_time_t support + */ + thd->security_ctx->master_access|= SHUTDOWN_ACL; + command= COM_SHUTDOWN; + } + VOID(pthread_mutex_lock(&LOCK_thread_count)); thd->query_id= global_query_id; |