summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-07 13:01:54 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-07 13:01:54 +0300
commite1e3293da56324c3efff25ed79d87ccf6c8fb2d8 (patch)
tree7206dfb09e1564deca8d665ea4a54339566d8e39 /sql
parent44fc4b8b38fe68ad7d68d5fd13e20bf32462ba19 (diff)
parentdf088b8de24b4cac58fa2b9eed2cafeb9d5abfd6 (diff)
downloadmariadb-git-e1e3293da56324c3efff25ed79d87ccf6c8fb2d8.tar.gz
merge
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 7af263f62c5..6603aa55d03 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1510,8 +1510,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
SHUTDOWN_DEFAULT is 0. If client is >= 4.1.3, the shutdown level is in
packet[0].
*/
- enum mysql_enum_shutdown_level level=
- (enum mysql_enum_shutdown_level) (uchar) packet[0];
+ enum mysql_enum_shutdown_level level;
+ if (!thd->is_valid_time())
+ level= SHUTDOWN_DEFAULT;
+ else
+ level= (enum mysql_enum_shutdown_level) (uchar) packet[0];
if (level == SHUTDOWN_DEFAULT)
level= SHUTDOWN_WAIT_ALL_BUFFERS; // soon default will be configurable
else if (level != SHUTDOWN_WAIT_ALL_BUFFERS)