# Testing various forms of idempotency for replication.  This file is
# for tests that should only be executed in row mode.

source include/have_binlog_format_row.inc;
source include/master-slave.inc;
connection master;
source include/have_innodb.inc;
connection slave;
source include/have_innodb.inc;

# Add suppression for expected warning(s) in slaves error log
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
set @saved_slave_rows_search_algorithms= @@global.slave_rows_search_algorithms;

SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN,TABLE_SCAN';
-- source extra/rpl_tests/rpl_row_idempotency.test

-- source include/rpl_reset.inc

SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN,HASH_SCAN';
-- source extra/rpl_tests/rpl_row_idempotency.test

set @@global.slave_rows_search_algorithms= @saved_slave_rows_search_algorithms;
--echo *** end of tests
--source include/rpl_end.inc
