diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-28 10:33:26 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-07-28 10:33:26 +0300 |
commit | f79cebb4d02a7b5151ac617bc762c3e094436562 (patch) | |
tree | 16008fa4f8d8d0b9b884670f6d850ae6a151520a /mysql-test/include | |
parent | 1630037959ab9516fc2a56d4901d2e5d794bc8e7 (diff) | |
parent | 742e1c727fc2be50b758068c2ab92abb19f3ff56 (diff) | |
download | mariadb-git-f79cebb4d02a7b5151ac617bc762c3e094436562.tar.gz |
Merge 10.7 into 10.8
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/ensure_binlog_row_event_columns.inc | 72 | ||||
-rw-r--r-- | mysql-test/include/mtr_warnings.sql | 4 |
2 files changed, 76 insertions, 0 deletions
diff --git a/mysql-test/include/ensure_binlog_row_event_columns.inc b/mysql-test/include/ensure_binlog_row_event_columns.inc new file mode 100644 index 00000000000..0dab9cc2735 --- /dev/null +++ b/mysql-test/include/ensure_binlog_row_event_columns.inc @@ -0,0 +1,72 @@ +# +# Helper file to ensure that a binary log file properly writes the expected +# fields based on the binlog_row_image value. +# +# ==== Usage ==== +# +# --let $expected_columns= (COLUMN_IDS) +# --let $binlog_filename= FILENAME +# --source include/count_binlog_row_event_columns.inc +# +# Parameters: +# expected_columns (list<uint>, in) : A list of positive integers which +# correspond to the column numbers that should be output in a binary +# log's write_rows event +# binlog_filename (string, in) : Name of the binary log file to analyze +# + +if (!$expected_columns) +{ + --die expected_columns parameter is required but was not set +} + +if (!$binlog_filename) +{ + --die binlog_filename parameter is required but was not set +} + +--let $include_filename= ensure_binlog_row_event_columns.inc [$expected_columns] +--source include/begin_include_file.inc + +--let $assert_file=$MYSQLTEST_VARDIR/tmp/binlog_decoded.out +--let mysqld_datadir=`select @@datadir` + +--echo # MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file +--exec $MYSQL_BINLOG $mysqld_datadir/$binlog_filename -vv > $assert_file + +--echo # Verifying all expected column ids appear in binlog event output.. +--let num_cols_found=0 +--let last_expected_col= `SELECT GREATEST $expected_columns` +--let i= 1 +while($i <= $last_expected_col) +{ + # By default, assume the column is not expected to be in the binary log. + # If the column id is set in expected_columns, then override assertion + # parameters. + --let assert_count= 0 + --let assert_text= Column @$i should not be in binary log + + if (`SELECT $i IN $expected_columns`) + { + --let assert_count= 1 + --let assert_text= Column @$i should be in binary log + + --inc $num_cols_found + } + + --let assert_select= @$i + --source include/assert_grep.inc + + --inc $i +} +--echo # ..success + +--echo # Verifying only expected column ids appear in binlog event output.. +--let assert_count= $num_cols_found +--let assert_text= The binlog event should only have $num_cols_found columns +--let assert_select= @[\d]+ +--source include/assert_grep.inc +--echo # ..success + +--let $include_filename= ensure_binlog_row_event_columns.inc [$expected_columns] +--source include/end_include_file.inc diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 4f767cfb136..06fad4204f7 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -156,6 +156,10 @@ INSERT INTO global_suppressions VALUES ("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"), ("InnoDB: Warning: semaphore wait:"), + /* MDEV-28976: Tests that kill the server do not ensure that the + old process has terminated before starting a new one */ + ("InnoDB: Unable to lock"), + /* BUG#32080 - Excessive warnings on Solaris: setrlimit could not change the size of core files |