# Inorder to grep a specific error pattern in error log a fresh error log # needs to be generated. --source include/force_restart.inc --source include/master-slave.inc --source include/have_binlog_format_statement.inc --source include/only_mts_slave_parallel_workers.inc # # Proving correct error reporting by Worker in condition of the failing query # size is close to that of internal buffer MAX_SLAVE_ERRMSG. # bug#18563480 MTS: CRASH WHEN SLAVE WORKER TRY TO EXECUTE A BIG STATEMENT doomed to fail # # Create a table on the slave to set up future error on its creation # via replication --connection slave call mtr.add_suppression("Slave SQL: Worker.*failed executing transaction"); call mtr.add_suppression("Slave SQL:.*The slave coordinator and worker threads are stopped"); --eval CREATE TABLE t (a TEXT) select "a" as a # Create a query size of over MAX_SLAVE_ERRMSG = 1024 --connection master --let i=0 --let select_arg=a while ($i < 1024) { --inc $i --let $select_arg=a$select_arg } --eval CREATE TABLE t (a TEXT) select "$select_arg" as a --connection slave # Error is found as expected. --let $slave_sql_errno= convert_error(ER_TABLE_EXISTS_ERROR) --source include/wait_for_slave_sql_error.inc # Remove slave side table, recover slave to catch up DROP TABLE t; --source include/start_slave_sql.inc --connection master --source include/sync_slave_sql_with_master.inc # # Cleanup # --connection master DROP TABLE t; --source include/sync_slave_sql_with_master.inc # Bug#21198611: MULTI-THREADED SLAVE LOG SPAMMING ON FAILURE # When a multi-threaded slave stops with an error, the same error message is # printed three times. # Steps that are executed above ensure that MTS slave stops with an error. # Following lines check that "The slave coordinator and worker threads are # stopped..." error message is printed only once in the error log. --let $expected_errno= convert_error(ER_MTS_INCONSISTENT_DATA) --replace_result $expected_errno ER_MTS_INCONSISTENT_DATA --replace_regex /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]+/--TIME--/ --let GREP_FILE=$MYSQLTEST_VARDIR/tmp/slave.err --let GREP_PATTERN=The slave coordinator and worker threads are stopped --source extra/rpl_tests/grep_pattern.inc --source include/rpl_end.inc