Skip to content

Commit 58c7f63

Browse files
committed
mysqltest: better error reporting when "shutdown" fails
as a side effect --replace and --error now work for shutdown command
1 parent 721a6a5 commit 58c7f63

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/mysqltest.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5199,7 +5199,11 @@ void do_shutdown_server(struct st_command *command)
51995199
*/
52005200

52015201
if (timeout && mysql_shutdown(mysql, SHUTDOWN_DEFAULT))
5202-
die("mysql_shutdown failed");
5202+
{
5203+
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
5204+
mysql_sqlstate(mysql), &ds_res);
5205+
DBUG_VOID_RETURN;
5206+
}
52035207

52045208
if (!timeout || wait_until_dead(pid, timeout))
52055209
{
@@ -8191,7 +8195,7 @@ static int match_expected_error(struct st_command *command,
81918195
81928196
SYNOPSIS
81938197
handle_error()
8194-
q - query context
8198+
command - command
81958199
err_errno - error number
81968200
err_error - error message
81978201
err_sqlstate - sql state

0 commit comments

Comments
 (0)