Commit 25932708 authored by Sergei Golubchik's avatar Sergei Golubchik

backport include/search_pattern_in_file.inc from 10.1

parent 5569ac00
......@@ -60,12 +60,12 @@
perl;
use strict;
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
my $search_range= $ENV{'SEARCH_RANGE'};
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
my $search_range= $ENV{'SEARCH_RANGE'};
my $file_content;
$search_range= 50000 unless $search_range =~ /-?[0-9]+/;
open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
open(FILE, '<', $search_file) or die("Unable to open '$search_file': $!\n");
if ($search_range >= 0) {
read(FILE, $file_content, $search_range, 0);
} else {
......@@ -75,7 +75,10 @@ perl;
read(FILE, $file_content, -$search_range, 0);
}
close(FILE);
if ( not $file_content =~ m{$search_pattern} ) {
die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n");
$search_file =~ s{^.*?([^/\\]+)$}{$1};
if ($file_content =~ m{$search_pattern}) {
print "FOUND /$search_pattern/ in $search_file\n"
} else {
print "NOT FOUND /$search_pattern/ in $search_file\n"
}
EOF
#
# Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS
#
FOUND /\[ERROR\] The server option \'lower_case_table_names\' is configured to use case sensitive table names/ in my_restart.err
......@@ -2154,3 +2154,4 @@ Privat (Private Nutzung) Mobilfunk
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
FOUND /\[ERROR\] Create named pipe failed/ in second-mysqld.err
......@@ -5432,6 +5432,7 @@ DROP FUNCTION f1;
DROP VIEW v1;
DROP TABLE t1, t2;
create view v1 as select 1;
FOUND /mariadb-version/ in v1.frm
drop view v1;
#
# MDEV-7260: Crash in get_best_combination when executing multi-table
......
set global log_warnings=2;
set @@wait_timeout=1;
FOUND /Aborted.*Got timeout reading communication packets/ in mysqld.1.err
set global log_warnings=@@log_warnings;
......@@ -33,6 +33,7 @@ INSERT INTO t1 VALUES(1,'X',1);
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
SELECT b FROM t1 LIMIT 3;
ERROR HY000: Lost connection to MySQL server during query
FOUND /Wrote log record for ibuf update in place operation/ in my_restart.err
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
......
......@@ -143,6 +143,7 @@ SET debug_dbug= @old_dbug;
INSERT INTO t4 VALUES (2);
include/wait_for_slave_sql_error.inc [errno=1590]
Last_SQL_Error = 'The incident LOST_EVENTS occurred on the master. Message: error writing to the binary log'
FOUND /Slave SQL: The incident LOST_EVENTS occurred on the master\. Message: error writing to the binary log, Internal MariaDB error code: 1590/ in mysqld.2.err
SELECT * FROM t4 ORDER BY a;
a
1
......
......@@ -38,5 +38,7 @@ a
3
4
5
FOUND /Slave SQL: Error 'Duplicate entry .* on query\. .*Query: '.*', Gtid 0-1-100, Internal MariaDB error code:|Slave SQL: Could not execute Write_rows.*table test.t1; Duplicate entry.*, Gtid 0-1-100, Internal MariaDB error/ in mysqld.2.err
FOUND /Slave SQL: The incident LOST_EVENTS occurred on the master\. Message: <none>, Internal MariaDB error code: 1590/ in mysqld.2.err
DROP TABLE t1;
include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment