mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user