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:
@ -9,9 +9,6 @@
|
|||||||
#
|
#
|
||||||
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
||||||
# before sourcing this routine.
|
# 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
|
# 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
|
# to search. If negative, it will search that many bytes at the end of the
|
||||||
@ -83,15 +80,7 @@ perl;
|
|||||||
close(FILE);
|
close(FILE);
|
||||||
$content.= $file_content;
|
$content.= $file_content;
|
||||||
}
|
}
|
||||||
my @matches;
|
my @matches= ($content =~ /$search_pattern/gs);
|
||||||
if (not defined($ENV{SEARCH_TYPE}))
|
|
||||||
{
|
|
||||||
@matches=($content =~ /$search_pattern/gs);
|
|
||||||
}
|
|
||||||
elsif($ENV{SEARCH_TYPE} == "_gm_")
|
|
||||||
{
|
|
||||||
@matches=($content =~ /$search_pattern/gm);
|
|
||||||
}
|
|
||||||
my $res;
|
my $res;
|
||||||
if (@matches)
|
if (@matches)
|
||||||
{
|
{
|
||||||
|
@ -16,10 +16,9 @@ if ($stop_position)
|
|||||||
--exec $MYSQL_BINLOG -F --print-table-metadata $_stop_position_opt $binlog_file > $output_file
|
--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_FILE= $output_file
|
||||||
--let SEARCH_OUTPUT=matches
|
--let SEARCH_OUTPUT=matches
|
||||||
--let SEARCH_TYPE="_gm_"
|
|
||||||
--source include/search_pattern_in_file.inc
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
if ($print_primary_key)
|
if ($print_primary_key)
|
||||||
|
Reference in New Issue
Block a user