Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
Bug#28505638 REWRITE INNODB TESTS TO IGNORE EXPECTED ASAN ERRORS
Browse files Browse the repository at this point in the history
Rewrite some innodb tests to ignore ASAN failures.
This is a backport from 8.0

Change-Id: I6229bd5a3b6ed60851b87f0ebae5fbc307a67222
  • Loading branch information
Tor Didriksen committed Aug 17, 2018
1 parent 006b367 commit e93e8db
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 60 deletions.
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/alter_kill.test
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ XA PREPARE 'x';

-- echo # Attempt to start without an *.ibd file.
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
-- error 3
-- error 3,42
-- exec $MYSQLD_CMD --core-file --console > $SEARCH_FILE 2>&1;

let SEARCH_PATTERN= \[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test.bug16735660.ibd;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/innodb-wl6045-linux.test
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ select * from t1;
--echo # Test[5] for lock.
--echo # Test Scenario: As mysqld is running, & then start the innochecksum which must fail.

--error 1
--error 1,42
--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd 2> $SEARCH_FILE
let SEARCH_PATTERN=Error: Unable to lock file:: $MYSQLD_DATADIR/test/t1.ibd;
--source include/search_pattern_in_file.inc
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/innodb-wl6445-2.test
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ let SEARCH_FILE= $error_log;
--echo # This confirms server is not automatically started in read-only mode.
#----------------------------------------------------------------------------------
# Detailed explanations of what happens are placed nearby the checks.
--error 1
--error 1,42
--exec $MYSQLD_CMD --core-file --loose-console > $error_log 2>&1

# We get depending on the platform either "./ibdata1" or ".\ibdata1".
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/innodb_bug70867.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let $args = --loose-console --core-file > $SEARCH_FILE 2>&1;

--mkdir $MYSQL_DATA_DIR/tmpdata
--chmod 0400 $MYSQL_DATA_DIR/tmpdata
--error 1
--error 1,42
--exec $MYSQLD_CMD --innodb_data_home_dir=$MYSQL_DATA_DIR/tmpdata $args
let SEARCH_PATTERN = returned OS error 113;
--source ./include/search_pattern.inc
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/suite/innodb/t/innodb_page_size_func.test
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let $mysqld=$MYSQLD_CMD --core-file --console > $error_log 2>&1 --innodb-page-si
#----------------------------------------------------------------------------------
--echo # 1.1 The value assigned is a number.
# Detailed explanations of what happens are placed nearby the checks.
--error 1
--error 1,42
--exec $mysqld=$other_page_size
if ( $default_page_size != $other_page_size )
{
Expand All @@ -134,7 +134,7 @@ let SEARCH_PATTERN=Data file '.*ibdata1' uses page size $start_page_size, but th
let SEARCH_PATTERN= \[ERROR\] Aborting;
--source include/search_pattern_in_file.inc
--echo # 1.2 The value assigned is a number followed by 'k'.
--error 1
--error 1,42
--exec $mysqld=$other_page_size_nk
if ( $default_page_size != $other_page_size )
{
Expand All @@ -159,7 +159,7 @@ let SEARCH_PATTERN= \[ERROR\] Aborting;
# 1. not supported
# 2. below the smallest supported one
# The restart attempt has to fail.
--error 1
--error 1,42
--exec $mysqld=$out_range_page_size
# The innodb page size gets raised to the lowest or biggest legal value.
let SEARCH_PATTERN= \[Warning\] option 'innodb-page-size': unsigned value $out_range_page_size adjusted to $adjust_page_size;
Expand All @@ -185,7 +185,7 @@ if ($zero_test)
{
--echo # We do not omit the test.
}
--error 1
--error 1,42
--exec $mysqld=garbage
# General server properties cause that
# - the plain wrong value "garbage" assigned to innodb page size gets
Expand Down Expand Up @@ -220,7 +220,7 @@ let SEARCH_PATTERN= \[ERROR\] InnoDB: Invalid page size=$illegal_pagesize;
--echo # <number>k is a legal page size.
#---------------------------------------------------------------------------------
# The restart attempt has to fail.
--error 1
--error 1,42
--exec $mysqld=$other_page_size_nkaramel
# The plain wrong value "<number>karamel" assigned to innodb page size seems
# to get mangled to "<number>k" which is a legal value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ DROP TABLE tab5;
let NEW_CMD = $MYSQLD --no-defaults $KEYRING_PLUGIN_OPT --lc_messages_dir=$MYSQL_SHAREDIR --innodb_page_size=64K --basedir=$MYSQLD_BASEDIR --datadir=$MYSQLD_DATADIR1 --innodb_log_file_size=5M --innodb_log_files_in_group=2 --innodb_undo_tablespaces=0</dev/null>>$MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;

--echo # Check Server startup failure when page size 64K
--error 1
--error 1,42
--exec $NEW_CMD

# Search for particular warning during server startup
Expand Down
24 changes: 12 additions & 12 deletions mysql-test/suite/innodb/t/log_corruption.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ let $args=--no-defaults --datadir=$newdir --secure-file-priv="" --loose-skip-sha

--echo # redo log from before MySQL 5.7.9
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9\\.;
--source include/search_pattern_in_file.inc

--echo # redo log from before MySQL 5.7.9, with corrupted log checkpoint
--remove_file $newdir/ib_logfile0
--copy_file $newdir/ib_logfile1 $newdir/ib_logfile0
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9, and we did not find a valid checkpoint;
--source include/search_pattern_in_file.inc

--echo # redo log from before MySQL 5.7.9, with corrupted log block
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption0.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9, and it appears corrupted;
--source include/search_pattern_in_file.inc

--echo # redo log from "after" MySQL 5.7.9, but with invalid header checksum
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption1.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum;
--source include/search_pattern_in_file.inc

--echo # distant future redo log format, with valid header checksum
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption2.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html;
--source include/search_pattern_in_file.inc

--echo # valid header, but old-format checkpoint blocks
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption3.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log;
--source include/search_pattern_in_file.inc
Expand All @@ -58,7 +58,7 @@ let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log;
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption4.zip -d $newdir > $SEARCH_FILE
# Anything below innodb_force_recovery=6 must find a valid redo log.
# Missing tablespace files are tolerated already with innodb_force_recovery=1.
--error 1
--error 1,42
--exec $MYSQLD $args --innodb-force-recovery=5
let SEARCH_PATTERN=InnoDB: Log block 2372 at lsn 1213952 has valid header, but checksum field contains 144444122, should be 3362026715;
--source include/search_pattern_in_file.inc
Expand All @@ -67,7 +67,7 @@ let SEARCH_PATTERN=InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT
let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed;
--source include/search_pattern_in_file.inc
--echo # --innodb-force-recovery=6 (skip the entire redo log)
--error 1
--error 1,42
--exec $MYSQLD $args --innodb-force-recovery=6
let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in read-only mode;
--source include/search_pattern_in_file.inc
Expand All @@ -77,14 +77,14 @@ let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in r
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption4a.zip -d $newdir > $SEARCH_FILE
# Anything below innodb_force_recovery=6 must find a valid redo log.
# Missing tablespace files are tolerated already with innodb_force_recovery=1.
--error 1
--error 1,42
--exec $MYSQLD $args --innodb-force-recovery=5
let SEARCH_PATTERN=InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.;
--source include/search_pattern_in_file.inc
let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed;
--source include/search_pattern_in_file.inc
--echo # --innodb-force-recovery=6 (skip the entire redo log)
--error 1
--error 1,42
--exec $MYSQLD $args --innodb-force-recovery=6
let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in read-only mode;
--source include/search_pattern_in_file.inc
Expand All @@ -93,7 +93,7 @@ let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in r
--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption5.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: Log scan progressed past the checkpoint lsn 1213964;
--source include/search_pattern_in_file.inc
Expand All @@ -110,7 +110,7 @@ let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error;
--echo # valid header, invalid checkpoint 1, valid checkpoint 2
--remove_file $newdir/ib_logfile0
--exec unzip $MYSQL_TEST_DIR/suite/innodb/t/log_corruption6.zip -d $newdir > $SEARCH_FILE
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=InnoDB: The log file was created by mysqlbackup --apply-log at ibbackup was here!!!1!\. The following crash recovery is part of a normal restore\.;
--source include/search_pattern_in_file.inc
Expand Down
30 changes: 15 additions & 15 deletions mysql-test/suite/innodb/t/log_file.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EOF

--echo # Start mysqld without the possibility to create innodb_undo_tablespaces
--mkdir $bugdir/undo002
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002';
--source include/search_pattern_in_file.inc
Expand All @@ -43,7 +43,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--list_files $bugdir

--echo # Start mysqld with non existent innodb_log_group_home_dir
--error 1
--error 1,42
--exec $MYSQLD $args --innodb_log_group_home_dir=/path/to/non-existent/
let SEARCH_PATTERN=File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+;
--source include/search_pattern_in_file.inc
Expand All @@ -59,7 +59,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
# complaining about mysql.* tables. This is sufficient for testing
# missing tablespaces.
--echo # Start mysqld to create tablespaces according to my.cnf
--error 1
--error 1,42
--exec $MYSQLD $args --skip-grant-tables --innodb-unknown-parameter
let SEARCH_PATTERN=unknown option '--innodb-unknown-parameter';
--source include/search_pattern_in_file.inc
Expand All @@ -78,7 +78,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;

--echo # 1. With ibdata2, Without ibdata1
--remove_file $bugdir/ibdata1
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists;
--source include/search_pattern_in_file.inc
Expand All @@ -90,7 +90,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;

--echo # 2. With ibdata1, without ibdata2
--remove_file $bugdir/ibdata2
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=Tablespace size stored in header is \d+ pages, but;
--source include/search_pattern_in_file.inc
Expand All @@ -104,7 +104,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_file $bugdir/ibdata1
--remove_file $bugdir/ibdata2
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
Expand All @@ -118,7 +118,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_files_wildcard $bugdir ibdata*
--remove_files_wildcard $bugdir ib_logfile*
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
Expand All @@ -134,7 +134,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_files_wildcard $bugdir ib_logfile*
--remove_file $bugdir/undo002
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
Expand All @@ -151,7 +151,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_file $bugdir/undo001
--remove_file $bugdir/undo002
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
Expand All @@ -164,7 +164,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--echo # 7. With ibdata files & Without undo002
--remove_file $bugdir/undo002
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able;
--source include/search_pattern_in_file.inc
Expand All @@ -179,7 +179,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_file $bugdir/undo001
--remove_file $bugdir/undo002
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able;
--source include/search_pattern_in_file.inc
Expand All @@ -196,7 +196,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--remove_files_wildcard $bugdir undo00*
--remove_file $bugdir/ib_logfile1
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\.;
--source include/search_pattern_in_file.inc
Expand All @@ -210,7 +210,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
#--remove_file $bugdir/ib_logfile0
# The below would start the server. Since we cannot start a parallel
# server, do not test the below case
#--error 1
#--error 1,42
#--exec $MYSQLD $args

# clean up & Restore
Expand All @@ -219,7 +219,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--echo # 11. With ibdata*, without ib_logfile1
--remove_file $bugdir/ib_logfile1
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=Only one log file found;
--source include/search_pattern_in_file.inc
Expand All @@ -232,7 +232,7 @@ let SEARCH_PATTERN=\[ERROR\] Aborting;
--echo # 12. With ibdata*, without ib_logfile2
--remove_file $bugdir/ib_logfile2
--list_files $bugdir
--error 1
--error 1,42
--exec $MYSQLD $args
let SEARCH_PATTERN=Resizing redo log from \d+\*\d+ to \d+\*\d+ pages, LSN=\d+;
--source include/search_pattern_in_file.inc
Expand Down
Loading

0 comments on commit e93e8db

Please sign in to comment.