mirror of
https://github.com/MariaDB/server.git
synced 2025-04-12 18:25:38 +02:00
mtr: make search_pattern_in_file.inc more verbose
report when a pattern is found do not abort, but merely report when a pattern is not found
This commit is contained in:
parent
4e15146fe6
commit
d214c83b5e
11 changed files with 32 additions and 6 deletions
mysql-test
include
r
suite
|
@ -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
|
||||
|
|
|
@ -5395,6 +5395,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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("Cannot decrypt .*filekeys-data.enc. Wrong key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Cannot decrypt .*filekeys-data.enc. Wrong key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("File 'bad' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /File 'bad' not found/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("Cannot decrypt .*filekeys-data.enc. Wrong key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Cannot decrypt .*filekeys-data.enc. Wrong key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("File '' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /File '' not found/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("File '.*keys.txt' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /File '.*keys.txt' not found/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -11,6 +12,7 @@ ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 2
|
|||
call mtr.add_suppression("File '.*keys.txt' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /File '.*keys.txt' not found/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -19,6 +21,7 @@ plugin_status
|
|||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key id/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -29,6 +32,7 @@ ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 11
|
|||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key id/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -37,6 +41,7 @@ plugin_status
|
|||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key id/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -47,6 +52,7 @@ ERROR HY000: Invalid key at MYSQL_TMP_DIR/keys.txt line 2, column 47
|
|||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key id/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -55,6 +61,7 @@ plugin_status
|
|||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -65,6 +72,7 @@ ERROR HY000: Invalid key at MYSQL_TMP_DIR/keys.txt line 2, column 33
|
|||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -73,6 +81,7 @@ plugin_status
|
|||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -83,6 +92,7 @@ ERROR HY000: Syntax error at MYSQL_TMP_DIR/keys.txt line 2, column 2
|
|||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Invalid key/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -91,6 +101,7 @@ plugin_status
|
|||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Syntax error/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -101,6 +112,7 @@ ERROR HY000: Syntax error at MYSQL_TMP_DIR/keys.txt line 2, column 1
|
|||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Syntax error/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
@ -109,6 +121,7 @@ plugin_status
|
|||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Syntax error/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
call mtr.add_suppression("Cannot decrypt .*keys.txt. Not encrypted");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
FOUND /Cannot decrypt .*keys.txt. Not encrypted/ in mysqld.1.err
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
|
|
|
@ -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 occured on the master. Message: error writing to the binary log'
|
||||
FOUND /Slave SQL: The incident LOST_EVENTS occured 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 occured on the master\. Message: <none>, Internal MariaDB error code: 1590/ in mysqld.2.err
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
|
Loading…
Add table
Reference in a new issue