###############################################################################
#  In this test case, we check how changes to temporary tables are written
#  to the binary log.
#
#
# B - Begin
# C - Commit
# R - Rollback
#
#
# T - Inserts a row into a T-table
#
#
# T-SELECT-N-Temp - Selects from a temporary N-table and inserts
#                   into a T-table.
# N-SELECT-N-Temp - Selects from a temporary N-table and inserts
#                   into a N-table.
# T-SELECT-T-Temp - Selects from a temporary T-table and inserts
#                   into a T-table.
# N-SELECT-T-Temp - Selects from a temporary T-table and inserts
#                   into a N-table.

# Create-N-Temp - Creates a temporary N-table if a temporary N-table
#                 was dropped before
# Create-T-Temp - Creates a temporary T-table if a temporary T-table
#                 was dropped before
#
#
# Drop-Temp-T-Temp - Drops a temporary T-table if there is any
# Drop-Temp-N-Temp - Drops a temporary N-table if there is any
# Drop-Temp-TN-Temp - Drops both a temporary T-table and N-table if there
#                     is any
# Drop-Temp-TT-Temp - Drops two temporary T-tables if there is any
# Drop-Temp-NN-Temp - Drops two temporary N-tables if there is any
#
# Note: MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written
#                   to binlog only if the corresponding temporary table exists.
#
# Drop-Temp-Xe-Temp - Tries to drop a temporary table that does not exist
# Drop-Temp-NXe-Temp - Drops a temporary N-table if there is any and
#                      a temporary table that does not exist
# Drop-Temp-TXe-Temp - Drops a temporary T-table if there is any and
#                      a temporary table that does not exist
#
#
# Drop-Temp-If-Xe-Temp - Tries to drop a temporary table that does not exist
# Drop-Temp-If-TXe-Temp - Drops a temporary T-table if there is any and
#                         a temporary table that does not exist
#
#
# Drop-T - Drops a T-table if there is any
# Drop-N - Drops a  N-table if there is any
# Drop-Xe - Tries to drop a table that does not exist
# Drop-TXe - Drops a T-table if there is any and a table that does
#            not exist
# Drop-NXe - Drops a N-table if there is any and a table that does
#            not exist
# Drop-TN - Drops both a T-table and N-table if there is any
# Drop-TT - Drops two T-tables if there is any
# Drop-NN - Drops two N-tables if there is any
# Drop-N-TN-Temp - Drops a N-table and both a temporary T-table and
#                  N-table if there is any
#
#
# Drop-If-Xe - Tries to drop a table that does not exist
# Drop-If-TXe - Drops a T-table if there is any and a table that does
#               not exist
#
#
# This test uses the commands available at:
#   suite/rpl/include/rpl_drop_create_temp_table.inc
#
###############################################################################


--echo #########################################################################
--echo #                            CONFIGURATION
--echo #########################################################################

call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");

--let $tot_table= 2
SET @commands= 'configure';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo #########################################################################
--echo #           1 - Tables dropped by "DROP TEMPORARY TABLE"
--echo #########################################################################
connection master;

--echo
--echo #
--echo #1) Generates in the binlog what follows:
--echo #
SET @commands= 'Drop-Temp-T-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-N-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-Xe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-If-Xe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-TXe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-If-TXe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-NXe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-If-NXe-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-TN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-TT-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-NN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-Temp-T-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-Xe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TN-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Ne C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp NeT-trig C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo #
--echo #3) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-Temp-T-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-Xe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TN-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Ne R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp NeT-trig R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo #########################################################################
--echo #                   2 - Tables dropped by "DROP TABLE"
--echo #########################################################################
connection master;

--echo
--echo #
--echo #1) Generates in the binlog what follows:
--echo #
SET @commands= 'Drop-T';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-N';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Xe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-If-Xe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-TXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-If-TXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-NXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-If-NXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-TN';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-TT';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-NN';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-N-TN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-TN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-T';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-N';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Xe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-If-Xe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-TXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-If-TXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-NXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-If-NXe';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-TN';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-TT';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-NN';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-N-TN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-TN-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo #########################################################################
--echo #                      3 - CREATE TEMPORARY TABLE
--echo #########################################################################
connection master;

--echo
--echo #
--echo #1) Generates in the binlog what follows:
--echo #
SET @commands= 'Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo #
--echo #3) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo #########################################################################
--echo #                     4 -  CHANGING TEMPORARY TABLES
--echo #########################################################################
connection master;

--echo
--echo #
--echo #1) Generates in the binlog what follows:
--echo #
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Ne C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo
--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo #
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Ne R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo # > MDEV-26833
--echo # Errored out and rolled back Te statement should not produce any event to binlog
--echo #   in the following cases:

SET @sav_var = @@session.binlog_direct_non_transactional_updates;

SET @@session.binlog_direct_non_transactional_updates = ON;
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo # Non-transactional side effects.
SET @commands= 'B T N-Temp Te Ne C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te Ne R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @@session.binlog_direct_non_transactional_updates = OFF;
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @commands= 'B T Drop-Temp-TT-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

--echo # Non-transactional side effects.
SET @commands= 'B T N-Temp Te Ne C';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
SET @commands= 'B T N-Temp Te Ne R';
--source suite/rpl/include/rpl_drop_create_temp_table.inc

SET @@session.binlog_direct_non_transactional_updates = @sav_var;
--echo # < MDEV-26833

--echo ###################################################################################
--echo #                               CHECK CONSISTENCY
--echo ###################################################################################
connection master;
sync_slave_with_master;

let $MYSQLD_DATADIR= `SELECT @@datadir`;

if (`select @@session.binlog_format != 'STATEMENT'`)
{
  --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-master.sql
  --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-slave.sql
  --diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql
}

--echo #########################################################################
--echo #                           CLEAN
--echo #########################################################################
SET @commands= 'clean';
--source suite/rpl/include/rpl_drop_create_temp_table.inc
