config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_parallel_worker_error.test

# 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/have_binlog_format_statement.inc
--source include/only_mts_slave_parallel_workers.inc
--source include/have_perfschema.inc
--source include/master-slave.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 for channel '': Worker.*failed executing transaction");
call mtr.add_suppression("Slave SQL for channel '':.*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

# The next assertion is related to:
# BUG#25231367: INCONSISTENT WORKER_ID BETWEEN RPL P_S TABLES AND MTS ERROR
#               MESSAGES
# It checks if the WORKER_ID of the worker reporting the failure in the
# replication_applier_status_by_worker table is the same informed in the
# reported error message.
--let $ps_from_clause= FROM performance_schema.replication_applier_status_by_worker WHERE LAST_ERROR_NUMBER <> 0
--let $ps_worker_id= `SELECT CONCAT("Worker ", WORKER_ID) $ps_from_clause`
--let $msg_worker_id= `SELECT LEFT(LAST_ERROR_MESSAGE, LENGTH("$ps_worker_id")) $ps_from_clause`
--let $assert_text= Error message should report same worker ID as WORKER_ID field in P_S tables
--let $assert_cond= "$ps_worker_id" = "$msg_worker_id"
--source include/assert.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][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][-+Z][0-9:]* *[0-9]* *\[/DATE_TIME [/
--let GREP_FILE=$MYSQLTEST_VARDIR/tmp/slave.err
--let GREP_PATTERN=The slave coordinator and worker threads are stopped
--source include/grep_pattern.inc

--source include/rpl_end.inc

Man Man