Skip to content

Commit

Permalink
PS-5363 (Merge MySQL 8.0.17): fixed regexps in the rpl.rpl_perfschema…
Browse files Browse the repository at this point in the history
…_threads_processlist_status MTR test case

Because of the clang-formatting "};" is no longer located on a separate line
and therefore '/\};/' can no longer be an indicator of the end of the
'all_server_stages' array definition.

In addition, added support for "extern PSI_stage_info XXX;" declarations.
  • Loading branch information
percona-ysorokin committed Oct 15, 2019
1 parent d894b8a commit 8d7dd4a
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,25 @@ perl;
{
$declared_stages{$1} = 1;
}
# Read extern declaration.
elsif (/extern\s+PSI_stage_info\s+([A-Za-z_0-9]+)\s*;/)
{
$declared_stages{$1} = 1;
}
# Figure out when we enter and leave the array initialization.
elsif (/PSI_stage_info\s*\*\s*all_server_stages\s*\[/)
{
$in_server_stage_list= 1;
}
elsif (/\};/) {
$in_server_stage_list= 0;
}
# Read element from list.
elsif ($in_server_stage_list &&
/\&\s*([A-Za-z_0-9]+)\s*,?/)
/\&\s*([A-Za-z_0-9]+)\s*(,|\};)/)
{
push(@listed_stages, $1);
if ($2 eq "};")
{
$in_server_stage_list= 0;
}
}
}
close MYSQLD_CC or die "Error $? closing $mysqld: $!";
Expand Down

0 comments on commit 8d7dd4a

Please sign in to comment.