diff options
| author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2014-10-22 13:51:33 +0200 |
|---|---|---|
| committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2014-10-22 13:51:33 +0200 |
| commit | 64af1ecc20ac4a21ee2a61c91d91fae98debd036 (patch) | |
| tree | 6dda11d1031cc574dc445338a30bcce0cb4393a8 /sql/sql_parse.cc | |
| parent | a050a87f78fa588959cbb701b035424688d064c1 (diff) | |
| download | mariadb-git-64af1ecc20ac4a21ee2a61c91d91fae98debd036.tar.gz | |
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.
Diffstat (limited to 'sql/sql_parse.cc')
| -rw-r--r-- | sql/sql_parse.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e6b67e57f09..0fe3c5b90ea 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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); |
