mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix two races in test main.processlist that could cause random failures (seen in Buildbot)
1. Do not use NULL `info' field in processlist to select the thread of interest. This can fail if the read of processlist ends up happening after REAP succeeds, but before the `info' field is reset. Instead, select on the CONNECTION_ID(), making sure we still scan the whole list to trigger the same code as in the original test case. 2. Wait for the query to really complete before reading it in the processlist. When REAP returns, it only means that ack has been sent to client, the reset of query stage happens a bit later in the code.
This commit is contained in:
@ -1505,6 +1505,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
MYSQL_COMMAND_DONE(res);
|
||||
}
|
||||
DEBUG_SYNC(thd,"dispatch_command_end");
|
||||
|
||||
/* Check that some variables are reset properly */
|
||||
DBUG_ASSERT(thd->abort_on_warning == 0);
|
||||
|
Reference in New Issue
Block a user