1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 into 11.4

This commit is contained in:
Marko Mäkelä
2024-12-02 11:35:34 +02:00
420 changed files with 6452 additions and 4162 deletions

View File

@@ -15,8 +15,17 @@
# file. By default the search happens from the last CURRENT_TEST:
# marker till the end of file (appropriate for searching error logs).
#
# Optionally, SEARCH_ABORT can be set to "FOUND" or "NOT FOUND" and this
# will abort if the search result doesn't match the requested one.
# Optionally, SEARCH_ABORT can be specified to abort the search (in error)
# if a specific search result is found. Its value is a regular expression
# (with an implicit start-of-string anchor '^' prepended), and the search
# result that it will match against is either 1) "FOUND <N>", where <N> is
# the specific number of matches found, or 2) "NOT FOUND".
#
# Optionally, SEARCH_WAIT can be specified to wait for a specific search
# result. Its usage mimics that of SEARCH_ABORT, in that its value is also
# a '^'-prepended regular expression, which will be matched against the same
# search result. The timeout can be set in SEARCH_TIMEOUT, default is 60
# seconds.
#
# Optionally, SEARCH_WAIT can be set to "FOUND" or "NOT FOUND", and this
# will wait for the condition to occur. The timeout can be set in
@@ -91,8 +100,7 @@ perl;
@matches= ($content =~ /$search_pattern/gs);
$res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND";
if (($ENV{SEARCH_WAIT} eq 'FOUND' && $res eq 'NOT FOUND') ||
($ENV{SEARCH_WAIT} eq 'NOT FOUND' && $res =~ m{^FOUND })) {
if ($ENV{SEARCH_WAIT} and not $res =~ /^$ENV{SEARCH_WAIT}/) {
if (time() - $start_time < $timeout) {
# Millisceond sleep emulated with select
select(undef, undef, undef, 0.1);

View File

@@ -1,55 +0,0 @@
# ==== Purpose ====
#
# Waits until pattern comes into log file or until a timeout is reached.
# This is a timeout wrapper for search_pattern_in_file.inc
#
#
# ==== Usage ====
#
# [--let $timeout= NUMBER in seconds]
# For other parameters, check search_pattern_in_file.inc
--let $wait_save_keep_include_silent=$keep_include_silent
--let $include_filename= wait_for_pattern_in_file.inc
--source include/begin_include_file.inc
--let $keep_include_silent= 1
let $_timeout= $timeout;
if (!$_timeout)
{
let $_timeout= 10;
if ($VALGRIND_TEST)
{
let $_timeout= 30;
}
}
let $_timeout_counter=`SELECT $_timeout * 10`;
let SEARCH_ABORT=NOT FOUND;
let $_continue= 1;
disable_abort_on_error;
while ($_continue)
{
source include/search_pattern_in_file.inc;
if (!$errno)
{
# Found match
let $_continue= 0;
}
if ($errno)
{
dec $_timeout_counter;
if ($_timeout_counter == 1)
{
enable_abort_on_error;
}
if (!$_timeout_counter)
{
let $_continue= 0;
}
}
}
enable_abort_on_error;
--source include/end_include_file.inc
--let $keep_include_silent=$wait_save_keep_include_silent