diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2011-01-10 14:12:23 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2011-01-10 14:12:23 +0100 |
commit | 6bbfe7c62ae1a5473ed3b3a86af77981cb169f4f (patch) | |
tree | 8a60264d868a96cc62cd1e63472cf1044708b208 /sql/sql_admin.cc | |
parent | 90650edf697d498d0969f4bd9b81301ffc633dfa (diff) | |
download | mariadb-git-6bbfe7c62ae1a5473ed3b3a86af77981cb169f4f.tar.gz |
Bug #58933 Assertion `thd- >is_error()' fails on shutdown with ongoing
OPTIMIZE TABLE
OPTIMIZE TABLE for InnoDB tables is handled as recreate + analyze.
The triggered assert checked that an error had been reported if either
recreate or analyze failed. However the assert failed to take into
account that they could have failed because OPTIMIZE TABLE had been
victim of KILL QUERY, KILL CONNECTION or server shutdown.
This patch adjusts the assert to take this possibility into account.
The problem was only noticeable on debug versions of the server.
Test case added to innodb_mysql_sync.test.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index f648d219fac..eb6853751ee 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -728,7 +728,7 @@ send_result_message: protocol->store(operator_name, system_charset_info); if (result_code) // either mysql_recreate_table or analyze failed { - DBUG_ASSERT(thd->is_error()); + DBUG_ASSERT(thd->is_error() || thd->killed); if (thd->is_error()) { const char *err_msg= thd->stmt_da->message(); |