diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-07 12:49:52 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-06-07 12:49:52 +0300 |
commit | df088b8de24b4cac58fa2b9eed2cafeb9d5abfd6 (patch) | |
tree | f08ea567b95e8464b179eb5bdee3cf776726d425 /sql | |
parent | 121e04732ea3b5edf36335f827cc5bcb08fb7665 (diff) | |
download | mariadb-git-df088b8de24b4cac58fa2b9eed2cafeb9d5abfd6.tar.gz |
Addendum to the fix for bug #52315: need to set a proper shutdown type
when an out-of-supported-range date is detected.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_parse.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d9e1ea9e4e7..b730e2585ae 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2243,8 +2243,12 @@ 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]; + DBUG_PRINT("quit",("Got shutdown command for level %u", level)); if (level == SHUTDOWN_DEFAULT) level= SHUTDOWN_WAIT_ALL_BUFFERS; // soon default will be configurable |