1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-7189: main.processlist fails sporadically in buildbot

The test case tried to trigger a DEBUG_SYNC point at the end of a SELECT
SLEEP(5) statement. It did this by using EXECUTE 2, intending to trigger first
at the end of SET DEBUG_SYNC, and second at the end of the SELECT SLEEP(5).

However, in --ps-protocol mode, this does not work, because the SELECT is
executed in two steps (Prepare followed by Execute). Thus, the DEBUG_SYNC got
triggered too early, during the Prepare stage rather than Execute, and the
test case could race and information_schema.processlist see the thread in the
wrong state.

This patch fixes by changing the way the DEBUG_SYNC point is triggered. Now we
add a DBUG injection inside the code for SLEEP(5). This ensures that the
DEBUG_SYNC point is not activated until the SLEEP(5) is running, ensuring
that the following wait for completion will be effective.
This commit is contained in:
Kristian Nielsen
2015-01-06 16:32:41 +01:00
parent 5fafc3ce42
commit 00649525ee
4 changed files with 17 additions and 12 deletions

View File

@ -2495,6 +2495,7 @@ sub environment_setup {
# ----------------------------------------------------
my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
"$basedir/extra/replace",
"$bindir/extra$opt_vs_config/replace",
"$path_client_bindir/replace");
$ENV{'REPLACE'}= native_path($exe_replace);