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

cleanup: remove SEARCH_TYPE from search_pattern_in_file.inc

This commit is contained in:
Sergei Golubchik
2024-01-25 15:00:39 +01:00
parent 424210abd2
commit bc46f1a7d9
2 changed files with 2 additions and 14 deletions

View File

@ -9,9 +9,6 @@
#
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
# before sourcing this routine.
# SEARCH_TYPE can also be set to either NULL(default) or _gm_
# NULL is equivalent of using m/SEARCH_PATTERN/gs
# _gm_ is equivalent of using m/SEARCH_RANGE/gm
#
# Optionally, SEARCH_RANGE can be set to the max number of bytes of the file
# to search. If negative, it will search that many bytes at the end of the
@ -83,15 +80,7 @@ perl;
close(FILE);
$content.= $file_content;
}
my @matches;
if (not defined($ENV{SEARCH_TYPE}))
{
@matches=($content =~ /$search_pattern/gs);
}
elsif($ENV{SEARCH_TYPE} == "_gm_")
{
@matches=($content =~ /$search_pattern/gm);
}
my @matches= ($content =~ /$search_pattern/gs);
my $res;
if (@matches)
{

View File

@ -16,10 +16,9 @@ if ($stop_position)
--exec $MYSQL_BINLOG -F --print-table-metadata $_stop_position_opt $binlog_file > $output_file
--let SEARCH_PATTERN= # (?:Columns\(| {8}).*
--let SEARCH_PATTERN= (?m-s:# (?:Columns\(| {8}).*)
--let SEARCH_FILE= $output_file
--let SEARCH_OUTPUT=matches
--let SEARCH_TYPE="_gm_"
--source include/search_pattern_in_file.inc
if ($print_primary_key)