Commit 89506992 authored by Alfranio Correia's avatar Alfranio Correia

merge mysql-trunk-bugfixing (local) --> mysql-trunk-bugfixing

parents b826eb9d 68ecc965
--source include/have_innodb.inc
--disable_abort_on_error
if (`SELECT HEX(@commands) = HEX('configure')`)
{
connection master;
#
# Creates a T-table that is never dropped.
#
--eval CREATE TABLE tt_xx_1 ( id INT ) ENGINE = Innodb
#
# Creates a N-table that is never dropped.
#
--eval CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam
#
# Creates a Temporary N-table that is never dropped.
#
--eval CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam
#
# Creates a Temporary N-table that is never dropped.
#
--eval CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb
#
# In what follows, we create a set of tables that are used
# throughout this test case. The number of tables to be
# created is give by the variable $tot_table.
#
#
# Creates Temporay N-tables that are automatically dropped and recreated
# when a command ends.
#
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
--disable_query_log
--eval SET @check_temp='$available_n_temp'
--enable_query_log
#
# Updates the $available_n_temp that keeps track of the created
# temporary N-tables.
#
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_n_temp= $available_n_temp,nt_tmp_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_n_temp= nt_tmp_$n
}
--dec $n
}
#
# Creates Temporay T-tables that are automatically dropped and recreated
# when a command ends.
#
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
--disable_query_log
--eval SET @check_temp='$available_t_temp'
--enable_query_log
#
# Updates the $available_t_temp that keeps track of the created
# temporary T-tables.
#
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_t_temp= $available_t_temp,tt_tmp_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_t_temp= tt_tmp_$n
}
--dec $n
}
#
# Creates N-tables that are automatically dropped and recreated
# when a command ends.
#
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS nt_$n
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
--disable_query_log
--eval SET @check_temp='$available_n'
--enable_query_log
#
# Updates the $available_n that keeps track of the created
# N-tables.
#
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_n= $available_n,nt_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_n= nt_$n
}
--dec $n
}
#
# Creates T-tables that are automatically dropped and recreated
# when a command ends.
#
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS tt_$n
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
--disable_query_log
--eval SET @check_temp='$available_t'
--enable_query_log
#
# Updates the $available_t that keeps track of the created
# T-tables.
#
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_t= $available_t,tt_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_t= tt_$n
}
--dec $n
}
--let $dropped_t_temp=
--let $dropped_n_temp=
--let $dropped_t=
--let $dropped_n=
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
SET @commands= '';
}
#
# Drops tables and synchronizes master and slave. Note that temporary
# tables are not explitcily dropped as they will be dropped while
# closing the connection.
#
if (`SELECT HEX(@commands) = HEX('clean')`)
{
connection master;
DROP TABLE IF EXISTS tt_xx_1;
DROP TABLE IF EXISTS nt_xx_1;
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS nt_$n
--dec $n
}
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS tt_$n
--dec $n
}
sync_slave_with_master;
SET @commands= '';
}
#
# This is the core of the test is responsible for processing
# the following commands:
#
# B - Begin
# C - Commit
# R - Rollback
#
#
# T - Inserts a row into a T-table
# N-Temp - Inserts a row into a temporary N-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
# 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
# Drop-If-NXe - Drops a N-table if there is any and a table that does
# not exist
#
while (`SELECT HEX(@commands) != HEX('')`)
{
--disable_query_log
SET @command= SUBSTRING_INDEX(@commands, ' ', 1);
let $command= `SELECT @command`;
--eval SET @check_commands= '$commands'
if (`SELECT HEX(@check_commands) = HEX('''')`)
{
let $commands= `SELECT @commands`;
}
if (`SELECT HEX(@command) = HEX('B')`)
{
--enable_query_log
eval BEGIN;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('T')`)
{
--enable_query_log
eval INSERT INTO tt_xx_1() VALUES (1);
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('N')`)
{
--enable_query_log
eval INSERT INTO nt_xx_1() VALUES (1);
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('N-Temp')`)
{
--enable_query_log
eval INSERT INTO nt_tmp_xx_1() VALUES (1);
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('N-SELECT-N-Temp')`)
{
--enable_query_log
eval INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('N-SELECT-T-Temp')`)
{
--enable_query_log
eval INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('T-SELECT-N-Temp')`)
{
--enable_query_log
eval INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('T-SELECT-T-Temp')`)
{
--enable_query_log
eval INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Create-N-Temp') || HEX(@command) = HEX('Create-T-Temp')`)
{
if (`SELECT HEX(@command) = HEX('Create-N-Temp')`)
{
--let $dropped_temp=$dropped_n_temp
--let $available_temp=$available_n_temp
}
if (`SELECT HEX(@command) = HEX('Create-T-Temp')`)
{
--let $dropped_temp=$dropped_t_temp
--let $available_temp=$available_t_temp
}
--eval SET @check_temp='$dropped_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
let $table=`SELECT @temp`;
--eval SET @check_temp='$available_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_temp= $available_temp,$table
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_temp= $table
}
--eval SET @check_temp='$dropped_temp'
--eval SET @table_temp='$table'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $dropped_temp= `SELECT @check_temp`
if (`SELECT HEX(@command) = HEX('Create-N-Temp')`)
{
--enable_query_log
--eval CREATE TEMPORARY TABLE $table ( id INT ) engine= MyIsam
--disable_query_log
--let $available_n_temp= $available_temp
--let $dropped_n_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Create-T-Temp')`)
{
--enable_query_log
--eval CREATE TEMPORARY TABLE $table ( id INT ) engine= Innodb
--disable_query_log
--let $available_t_temp= $available_temp
--let $dropped_t_temp= $dropped_temp
}
}
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp') || HEX(@command) = HEX('Drop-Temp-T-Temp') || HEX(@command) = HEX('Drop-T') || HEX(@command) = HEX('Drop-N')`)
{
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp')`)
{
--let $dropped_temp=$dropped_n_temp
--let $available_temp=$available_n_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-T-Temp')`)
{
--let $dropped_temp=$dropped_t_temp
--let $available_temp=$available_t_temp
}
if (`SELECT HEX(@command) = HEX('Drop-N')`)
{
--let $dropped_temp=$dropped_n
--let $available_temp=$available_n
}
if (`SELECT HEX(@command) = HEX('Drop-T')`)
{
--let $dropped_temp=$dropped_t
--let $available_temp=$available_t
}
--eval SET @check_temp='$available_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
let $table=`SELECT @temp`;
--eval SET @check_temp='$dropped_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $dropped_temp= $dropped_temp,$table
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $dropped_temp= $table
}
--eval SET @check_temp='$available_temp'
--eval SET @table_temp='$table'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_temp= `SELECT @check_temp`
if (`SELECT HEX(@command) = HEX('Drop-Temp-N-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table
--disable_query_log
--let $available_n_temp= $available_temp
--let $dropped_n_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-T-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table
--disable_query_log
--let $available_t_temp= $available_temp
--let $dropped_t_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-N')`)
{
--enable_query_log
--eval DROP TABLE $table
--disable_query_log
--let $available_n= $available_temp
--let $dropped_n= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-T')`)
{
--enable_query_log
--eval DROP TABLE $table
--disable_query_log
--let $available_t= $available_temp
--let $dropped_t= $dropped_temp
}
}
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-Xe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE tt_xx_1
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-Xe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE IF EXISTS tt_xx_1
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Drop-Xe')`)
{
--enable_query_log
--eval DROP TABLE xx_1
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Drop-If-Xe')`)
{
--enable_query_log
--eval DROP TABLE IF EXISTS xx_1
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-TXe-Temp') || HEX(@command) = HEX('Drop-NXe') || HEX(@command) = HEX('Drop-TXe') || HEX(@command) = HEX('Drop-Temp-If-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-TXe-Temp') || HEX(@command) = HEX('Drop-If-NXe') || HEX(@command) = HEX('Drop-If-TXe')`)
{
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-NXe-Temp')`)
{
--let $dropped_temp=$dropped_n_temp
--let $available_temp=$available_n_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-TXe-Temp') || HEX(@command) = HEX('Drop-Temp-If-TXe-Temp')`)
{
--let $dropped_temp=$dropped_t_temp
--let $available_temp=$available_t_temp
}
if (`SELECT HEX(@command) = HEX('Drop-NXe') || HEX(@command) = HEX('Drop-If-NXe')`)
{
--let $dropped_temp=$dropped_n
--let $available_temp=$available_n
}
if (`SELECT HEX(@command) = HEX('Drop-TXe') || HEX(@command) = HEX('Drop-If-TXe')`)
{
--let $dropped_temp=$dropped_t
--let $available_temp=$available_t
}
--eval SET @check_temp='$available_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
let $table=`SELECT @temp`;
--eval SET @check_temp='$dropped_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $dropped_temp= $dropped_temp,$table
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $dropped_n_temp= $table
}
--eval SET @check_temp='$available_temp'
--eval SET @table_temp='$table'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_temp= `SELECT @check_temp`
if (`SELECT HEX(@command) = HEX('Drop-Temp-NXe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table, tt_1
--disable_query_log
--let $available_n_temp= $available_temp
--let $dropped_n_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-NXe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE IF EXISTS $table, tt_1
--disable_query_log
--let $available_n_temp= $available_temp
--let $dropped_n_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-TXe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table, tt_1
--disable_query_log
--let $available_t_temp= $available_temp
--let $dropped_t_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-If-TXe-Temp')`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE IF EXISTS $table, tt_1
--disable_query_log
--let $available_t_temp= $available_temp
--let $dropped_t_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-NXe')`)
{
--enable_query_log
--eval DROP TABLE $table, xx_1
--disable_query_log
--let $available_n= $available_temp
--let $dropped_n= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-If-NXe')`)
{
--enable_query_log
--eval DROP TABLE IF EXISTS $table, xx_1
--disable_query_log
--let $available_n= $available_temp
--let $dropped_n= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-TXe')`)
{
--enable_query_log
--eval DROP TABLE $table, xx_1
--disable_query_log
--let $available_t= $available_temp
--let $dropped_t= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-If-TXe')`)
{
--enable_query_log
--eval DROP TABLE IF EXISTS $table, xx_1
--disable_query_log
--let $available_t= $available_temp
--let $dropped_t= $dropped_temp
}
}
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp') || HEX(@command) = HEX('Drop-Temp-TT-Temp') || HEX(@command) = HEX('Drop-NN') || HEX(@command) = HEX('Drop-TT')`)
{
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp')`)
{
--let $dropped_temp=$dropped_n_temp
--let $available_temp=$available_n_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-TT-Temp')`)
{
--let $dropped_temp=$dropped_t_temp
--let $available_temp=$available_t_temp
}
if (`SELECT HEX(@command) = HEX('Drop-NN')`)
{
--let $dropped_temp=$dropped_n
--let $available_temp=$available_n
}
if (`SELECT HEX(@command) = HEX('Drop-TT')`)
{
--let $dropped_temp=$dropped_t
--let $available_temp=$available_t
}
--eval SET @check_temp='$available_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $n= 2
while (`SELECT HEX(@check_temp) != HEX('') && $n != 0`)
{
SET @temp= SUBSTRING_INDEX(@check_temp, ',', 1);
let $table=`SELECT @temp`;
--eval SET @check_temp='$dropped_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $dropped_temp= $dropped_temp,$table
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $dropped_temp= $table
}
if (`SELECT $n = 1`)
{
--let $table_1= $table
}
if (`SELECT $n = 2`)
{
--let $table_2= $table
}
--dec $n
--eval SET @check_temp='$available_temp'
--eval SET @table_temp='$table'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_temp= `SELECT @check_temp`
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-NN-Temp') && $n = 0`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table_1, $table_2
--disable_query_log
--let $available_n_temp= $available_temp
--let $dropped_n_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-TT-Temp') && $n= 0`)
{
--enable_query_log
--eval DROP TEMPORARY TABLE $table_1, $table_2
--disable_query_log
--let $available_t_temp= $available_temp
--let $dropped_t_temp= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-NN') && $n = 0`)
{
--enable_query_log
--eval DROP TABLE $table_1, $table_2
--disable_query_log
--let $available_n= $available_temp
--let $dropped_n= $dropped_temp
}
if (`SELECT HEX(@command) = HEX('Drop-TT') && $n= 0`)
{
--enable_query_log
--eval DROP TABLE $table_1, $table_2
--disable_query_log
--let $available_t= $available_temp
--let $dropped_t= $dropped_temp
}
}
}
if (`SELECT HEX(@command) = HEX('Drop-Temp-TN-Temp')`)
{
--eval SET @check_temp_t='$available_t_temp'
--eval SET @check_temp_n='$available_n_temp'
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('')`)
{
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
let $table_t=`SELECT @temp_t`;
--eval SET @check_temp_t='$dropped_t_temp'
if (`SELECT HEX(@check_temp_t) != HEX('')`)
{
--let $dropped_t_temp= $dropped_t_temp,$table_t
}
if (`SELECT HEX(@check_temp_t) = HEX('')`)
{
--let $dropped_t_temp= $table_t
}
--eval SET @check_temp='$available_t_temp'
--eval SET @table_temp='$table_t'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_t_temp= `SELECT @check_temp`
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
let $table_n=`SELECT @temp_n`;
--eval SET @check_temp_n='$dropped_n_temp'
if (`SELECT HEX(@check_temp_n) != HEX('')`)
{
--let $dropped_n_temp= $dropped_n_temp,$table_n
}
if (`SELECT HEX(@check_temp_n) = HEX('')`)
{
--let $dropped_n_temp= $table_n
}
--eval SET @check_temp='$available_n_temp'
--eval SET @table_temp='$table_n'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_t_temp= `SELECT @check_temp`
--enable_query_log
--eval DROP TEMPORARY TABLE $table_t, $table_n
--disable_query_log
}
}
if (`SELECT HEX(@command) = HEX('Drop-TN')`)
{
--eval SET @check_temp_t='$available_t'
--eval SET @check_temp_n='$available_n'
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('')`)
{
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
let $table_t=`SELECT @temp_t`;
--eval SET @check_temp_t='$dropped_t'
if (`SELECT HEX(@check_temp_t) != HEX('')`)
{
--let $dropped_t= $dropped_t,$table_t
}
if (`SELECT HEX(@check_temp_t) = HEX('')`)
{
--let $dropped_t= $table_t
}
--eval SET @check_temp='$available_t'
--eval SET @table_temp='$table_t'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_t= `SELECT @check_temp`
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
let $table_n=`SELECT @temp_n`;
--eval SET @check_temp_n='$dropped_n'
if (`SELECT HEX(@check_temp_n) != HEX('')`)
{
--let $dropped_n= $dropped_n,$table_n
}
if (`SELECT HEX(@check_temp_n) = HEX('')`)
{
--let $dropped_n= $table_n
}
--eval SET @check_temp='$available_n'
--eval SET @table_temp='$table_n'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_t= `SELECT @check_temp`
--enable_query_log
--eval DROP TABLE $table_t, $table_n
--disable_query_log
}
}
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp') || HEX(@command) = HEX('Drop-TN-Temp')`)
{
--eval SET @check_temp_t='$available_t_temp'
--eval SET @check_temp_n='$available_n_temp'
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp')`)
{
--eval SET @check_n='$available_n'
}
if (`SELECT HEX(@command) = HEX('Drop-TN-Temp')`)
{
#
# Just to be possible to go through the next if...
#
--eval SET @check_n='...'
}
if (`SELECT HEX(@check_temp_t) != HEX('') && HEX(@check_temp_n) != HEX('') && HEX(@check_n) != HEX('')`)
{
SET @temp_t= SUBSTRING_INDEX(@check_temp_t, ',', 1);
let $table_temp_t=`SELECT @temp_t`;
--eval SET @check_temp_t='$dropped_t_temp'
if (`SELECT HEX(@check_temp_t) != HEX('')`)
{
--let $dropped_t_temp= $dropped_t_temp,$table_temp_t
}
if (`SELECT HEX(@check_temp_t) = HEX('')`)
{
--let $dropped_t_temp= $table_temp_t
}
--eval SET @check_temp='$available_t_temp'
--eval SET @table_temp='$table_temp_t'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_t_temp= `SELECT @check_temp`
SET @temp_n= SUBSTRING_INDEX(@check_temp_n, ',', 1);
let $table_temp_n=`SELECT @temp_n`;
--eval SET @check_temp_n='$dropped_n_temp'
if (`SELECT HEX(@check_temp_n) != HEX('')`)
{
--let $dropped_n_temp= $dropped_n_temp,$table_temp_n
}
if (`SELECT HEX(@check_temp_n) = HEX('')`)
{
--let $dropped_n_temp= $table_temp_n
}
--eval SET @check_temp='$available_n_temp'
--eval SET @table_temp='$table_temp_n'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_n_temp= `SELECT @check_temp`
if (`SELECT HEX(@command) = HEX('Drop-N-TN-Temp')`)
{
SET @temp_n= SUBSTRING_INDEX(@check_n, ',', 1);
let $table_n=`SELECT @temp_n`;
--eval SET @check_n='$dropped_n'
if (`SELECT HEX(@check_n) != HEX('')`)
{
--let $dropped_n= $dropped_n,$table_n
}
if (`SELECT HEX(@check_n) = HEX('')`)
{
--let $dropped_n= $table_n
}
--eval SET @check_temp='$available_n'
--eval SET @table_temp='$table_n'
SET @check_temp= LTRIM(SUBSTRING(@check_temp, LENGTH(@table_temp) + 2));
--let $available_n= `SELECT @check_temp`
--enable_query_log
--eval DROP TABLE $table_temp_t, $table_temp_n, $table_n
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('Drop-TN-Temp')`)
{
--enable_query_log
--eval DROP TABLE $table_temp_t, $table_temp_n
--disable_query_log
}
}
}
if (`SELECT HEX(@command) = HEX('C')`)
{
--enable_query_log
--error 0, ER_GET_ERRMSG
eval COMMIT;
--disable_query_log
}
if (`SELECT HEX(@command) = HEX('R')`)
{
--enable_query_log
--error 0, ER_GET_ERRMSG
eval ROLLBACK;
--disable_query_log
}
SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1));
if (`SELECT HEX(@commands) = HEX('')`)
{
let $binlog_start= $pos_trans_command;
--echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b-
--source include/show_binlog_events.inc
--echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e-
--echo
--disable_warnings
--let $available_n_temp=
--let $dropped_n_temp=
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
--eval SET @check_temp='$available_n_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_n_temp= $available_n_temp,nt_tmp_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_n_temp= nt_tmp_$n
}
--dec $n
}
--let $available_t_temp=
--let $dropped_t_temp=
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
--eval SET @check_temp='$available_t_temp'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_t_temp= $available_t_temp,tt_tmp_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_t_temp= tt_tmp_$n
}
--dec $n
}
--let $available_t=
--let $dropped_t=
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS tt_$n
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
--eval SET @check_temp='$available_t'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_t= $available_t,tt_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_t= tt_$n
}
--dec $n
}
--let $available_n=
--let $dropped_n=
--let $n= $tot_table
while (`SELECT $n != 0`)
{
--eval DROP TABLE IF EXISTS nt_$n
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
--eval SET @check_temp='$available_n'
if (`SELECT HEX(@check_temp) != HEX('')`)
{
--let $available_n= $available_n,nt_$n
}
if (`SELECT HEX(@check_temp) = HEX('')`)
{
--let $available_n= nt_$n
}
--dec $n
}
--enable_warnings
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
let $commands= '';
}
--enable_query_log
}
###############################################################################
# In this test case, we check how changes to temporary tables are written
# to the binary log.
#
# (TODO --- GET INFO AS SOON AS THE SITE IS AVAILABLE)
#
# This test uses the commands available at:
# extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-N-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-Xe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-If-Xe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-TXe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-If-TXe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-NXe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-If-NXe-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-TN-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-TT-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-NN-Temp';
--source extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-N-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-Xe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TT-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NN-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
--source extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-N-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-Xe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TT-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NN-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
--source extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-N';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Xe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-If-Xe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-TXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-If-TXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-NXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-If-NXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-TN';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-TT';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-NN';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-N-TN-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-TN-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo #
SET @commands= 'B T Drop-T';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-N';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-Xe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-If-Xe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-TXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-If-TXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-NXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-If-NXe';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-TN';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-TT';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-NN';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-N-TN-Temp';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B T Drop-TN-Temp';
--source extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
--source extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
--source extra/rpl_tests/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 extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
--source extra/rpl_tests/rpl_drop_create_temp_table.inc
--echo ###################################################################################
--echo # CHECK CONSISTENCY
--echo ###################################################################################
connection master;
sync_slave_with_master;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--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 extra/rpl_tests/rpl_drop_create_temp_table.inc
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
#########################################################################
# CONFIGURATION
#########################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
SET @commands= 'configure';
CREATE TABLE tt_xx_1 ( id INT ) ENGINE = Innodb;
CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
Note 1051 Unknown table 'nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
Note 1051 Unknown table 'nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
Note 1051 Unknown table 'tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
Note 1051 Unknown table 'tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
Note 1051 Unknown table 'nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
Note 1051 Unknown table 'nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
Note 1051 Unknown table 'tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
# 1 - Tables dropped by "DROP TEMPORARY TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TT-Temp';
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TT-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TT-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NN-Temp';
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 2 - Tables dropped by "DROP TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-T';
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N';
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN';
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TT';
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NN';
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-T';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TT';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 3 - CREATE TEMPORARY TABLE
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 4 - CHANGING TEMPORARY TABLES
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
###################################################################################
# CHECK CONSISTENCY
###################################################################################
#########################################################################
# CLEAN
#########################################################################
SET @commands= 'clean';
DROP TABLE IF EXISTS tt_xx_1;
DROP TABLE IF EXISTS nt_xx_1;
DROP TABLE IF EXISTS nt_2;
DROP TABLE IF EXISTS nt_1;
DROP TABLE IF EXISTS tt_2;
DROP TABLE IF EXISTS tt_1;
SET @commands= '';
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
#########################################################################
# CONFIGURATION
#########################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
SET @commands= 'configure';
CREATE TABLE tt_xx_1 ( id INT ) ENGINE = Innodb;
CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
Note 1051 Unknown table 'nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
Note 1051 Unknown table 'nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
Note 1051 Unknown table 'tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
Note 1051 Unknown table 'tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
Note 1051 Unknown table 'nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
Note 1051 Unknown table 'nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
Note 1051 Unknown table 'tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
# 1 - Tables dropped by "DROP TEMPORARY TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TT-Temp';
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TT-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1`,`tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TT-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NN-Temp';
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1`,`tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1`,`tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1`,`tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1`,`tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`,`nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 2 - Tables dropped by "DROP TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-T';
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N';
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN';
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TT';
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NN';
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-T';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TT';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2`,`nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 3 - CREATE TEMPORARY TABLE
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 4 - CHANGING TEMPORARY TABLES
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
###################################################################################
# CHECK CONSISTENCY
###################################################################################
#########################################################################
# CLEAN
#########################################################################
SET @commands= 'clean';
DROP TABLE IF EXISTS tt_xx_1;
DROP TABLE IF EXISTS nt_xx_1;
DROP TABLE IF EXISTS nt_2;
DROP TABLE IF EXISTS nt_1;
DROP TABLE IF EXISTS tt_2;
DROP TABLE IF EXISTS tt_1;
SET @commands= '';
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
#########################################################################
# CONFIGURATION
#########################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
SET @commands= 'configure';
CREATE TABLE tt_xx_1 ( id INT ) ENGINE = Innodb;
CREATE TABLE nt_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
Note 1051 Unknown table 'nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
Note 1051 Unknown table 'nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
Note 1051 Unknown table 'tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
Note 1051 Unknown table 'tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
Note 1051 Unknown table 'nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
Note 1051 Unknown table 'nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
Note 1051 Unknown table 'tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
# 1 - Tables dropped by "DROP TEMPORARY TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TT-Temp';
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TT-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TT-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NN-Temp';
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
ERROR 42S02: Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
Note 1051 Unknown table 'tt_xx_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_xx_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
ERROR 42S02: Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
ERROR 42S02: Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
Note 1051 Unknown table 'tt_1'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ERROR 42S02: Unknown table 'nt_tmp_2'
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
INSERT INTO nt_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 2 - Tables dropped by "DROP TABLE"
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-T';
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N';
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN';
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TT';
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-NN';
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-N-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-TN-Temp';
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-T';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-T << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-T << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-Xe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS tt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-TXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
ERROR 42S02: Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-If-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
Note 1051 Unknown table 'xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS nt_2, xx_1
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-If-NXe << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TT';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_1, tt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TT << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_1, tt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TT << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-NN';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_1, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NN << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE nt_1, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-NN << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-N-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2, nt_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2, nt_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B T Drop-TN-Temp';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_tmp_2, nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; DROP TABLE tt_tmp_2, nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 3 - CREATE TEMPORARY TABLE
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp';
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#3) Generates in the binlog what follows:
#
SET @commands= 'B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2;
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam;
DROP TEMPORARY TABLE nt_tmp_1;
DROP TEMPORARY TABLE nt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE nt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R';
BEGIN;
DROP TEMPORARY TABLE tt_tmp_2;
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
DROP TEMPORARY TABLE tt_tmp_1;
DROP TEMPORARY TABLE tt_tmp_2;
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tt_tmp_2
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
#########################################################################
# 4 - CHANGING TEMPORARY TABLES
#########################################################################
#
#1) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp C';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
#
#2) Generates in the binlog what follows:
#
SET @commands= 'B N N-Temp N-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-N-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp N-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp R';
BEGIN;
INSERT INTO nt_xx_1() VALUES (1);
INSERT INTO nt_tmp_xx_1() VALUES (1);
INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1;
INSERT INTO nt_tmp_xx_1() VALUES (1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-b-b-b-b-b-b-b-b-b-b-b- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM tt_tmp_xx_1
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
###################################################################################
# CHECK CONSISTENCY
###################################################################################
#########################################################################
# CLEAN
#########################################################################
SET @commands= 'clean';
DROP TABLE IF EXISTS tt_xx_1;
DROP TABLE IF EXISTS nt_xx_1;
DROP TABLE IF EXISTS nt_2;
DROP TABLE IF EXISTS nt_1;
DROP TABLE IF EXISTS tt_2;
DROP TABLE IF EXISTS tt_1;
SET @commands= '';
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
########################################################################
# VERIFY ITEMS 1 and 2
########################################################################
#
# Create temporary tables to verify when statements involving temporary
# tables are classified as safe or unsafe by printing out the warning
# messages.
#
CREATE TABLE t_myisam(id int) engine= MyIsam;
INSERT INTO t_myisam VALUES(1);
CREATE TABLE t_innodb(id int) engine= Innodb;
INSERT INTO t_innodb VALUES(1);
CREATE TEMPORARY TABLE t_myisam_temp(id int) engine= MyIsam;
INSERT INTO t_myisam_temp VALUES(1);
CREATE TEMPORARY TABLE t_innodb_temp(id int) engine= Innodb;
INSERT INTO t_innodb_temp VALUES(1);
BEGIN;
INSERT INTO t_myisam SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_innodb_temp;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
BEGIN;
INSERT INTO t_myisam SELECT * FROM t_innodb_temp;
INSERT INTO t_innodb SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_innodb_temp;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
########################################################################
# VERIFY ITEM 3
########################################################################
#
# When there is a temporary table we can switch between the mixed and
# row formats. However, we cannot switch to the statement format.
#
SET BINLOG_FORMAT=MIXED;
SET BINLOG_FORMAT=ROW;
SET BINLOG_FORMAT=MIXED;
SET BINLOG_FORMAT=STATEMENT;
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
#
# When there is a temporary table we can switch between the mixed and
# row formats. However, we cannot swith to the statement format.
#
SET BINLOG_FORMAT=MIXED;
DROP TABLE t_myisam_temp, t_innodb_temp, t_myisam, t_innodb;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam SELECT * FROM t_myisam_temp
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb SELECT * FROM t_myisam_temp
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb SELECT * FROM t_innodb_temp
master-bin.000001 # Query # # ROLLBACK
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam SELECT * FROM t_innodb_temp
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb SELECT * FROM t_myisam_temp
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb SELECT * FROM t_innodb_temp
master-bin.000001 # Query # # ROLLBACK
master-bin.000001 # Query # # use `test`; DROP TABLE `t_myisam`,`t_innodb` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t_myisam_temp`,`t_innodb_temp` /* generated by server */
########################################################################
# VERIFY ITEMS 4 and 5
########################################################################
#
BEGIN;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
INSERT INTO tmp1 VALUES(1);
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
INSERT INTO tmp2 VALUES(1);
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp1;
DROP TEMPORARY TABLE tmp2;
DROP TEMPORARY TABLE tmp3;
COMMIT;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam
master-bin.000001 # Query # # use `test`; INSERT INTO tmp1 VALUES(1)
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 LIKE tmp1
master-bin.000001 # Query # # use `test`; INSERT INTO tmp2 VALUES(1)
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1
master-bin.000001 # Query # # use `test`; INSERT INTO tmp3 VALUES(1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp3
master-bin.000001 # Query # # COMMIT
BEGIN;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
INSERT INTO tmp1 VALUES(1);
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
INSERT INTO tmp2 VALUES(1);
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp1;
DROP TEMPORARY TABLE tmp2;
DROP TEMPORARY TABLE tmp3;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam
master-bin.000001 # Query # # use `test`; INSERT INTO tmp1 VALUES(1)
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 LIKE tmp1
master-bin.000001 # Query # # use `test`; INSERT INTO tmp2 VALUES(1)
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1
master-bin.000001 # Query # # use `test`; INSERT INTO tmp3 VALUES(1)
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp2
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE tmp3
master-bin.000001 # Query # # ROLLBACK
########################################################################
# VERIFY ITEM 6
########################################################################
SET BINLOG_FORMAT=STATEMENT;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
SET BINLOG_FORMAT=ROW;
DROP TEMPORARY TABLE tmp1;
BEGIN;
INSERT INTO tmp2 VALUES(1);
DROP TEMPORARY TABLE tmp2;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp3;
COMMIT;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 LIKE tmp1
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp1` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp3` /* generated by server */
master-bin.000001 # Query # # COMMIT
SET BINLOG_FORMAT=STATEMENT;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
SET BINLOG_FORMAT=ROW;
DROP TEMPORARY TABLE tmp1;
BEGIN;
INSERT INTO tmp2 VALUES(1);
DROP TEMPORARY TABLE tmp2;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp3;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 LIKE tmp1
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp1` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp2` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tmp3` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
########################################################################
# VERIFY ITEM 7
########################################################################
SET BINLOG_FORMAT=STATEMENT;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TABLE t_myisam (f1 BIGINT) ENGINE = MyISAM;
CREATE TABLE t_innodb (f1 BIGINT) ENGINE = Innodb;
BEGIN;
INSERT INTO t_myisam VALUES(CONNECTION_ID());
INSERT INTO tmp1 VALUES(1);
INSERT INTO t_myisam VALUES(1);
INSERT INTO t_innodb VALUES(1);
INSERT INTO t_myisam VALUES(CONNECTION_ID());
INSERT INTO t_innodb VALUES(1);
COMMIT;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam
master-bin.000001 # Query # # use `test`; CREATE TABLE t_myisam (f1 BIGINT) ENGINE = MyISAM
master-bin.000001 # Query # # use `test`; CREATE TABLE t_innodb (f1 BIGINT) ENGINE = Innodb
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam VALUES(CONNECTION_ID())
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO tmp1 VALUES(1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam VALUES(1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam VALUES(CONNECTION_ID())
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb VALUES(1)
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb VALUES(1)
master-bin.000001 # Xid # # COMMIT /* XID */
########################################################################
# VERIFY ITEM 8
########################################################################
SET BINLOG_FORMAT=MIXED;
BEGIN;
CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb;
INSERT INTO t_innodb VALUES(1);
INSERT INTO t_innodb VALUES(1);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb VALUES(1)
master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb VALUES(1)
master-bin.000001 # Query # # ROLLBACK
###################################################################################
# CHECK CONSISTENCY
###################################################################################
###################################################################################
# CLEAN UP
###################################################################################
DROP TABLE t_myisam;
DROP TABLE t_innodb;
###################################################################################
# This test cases evaluates the mixture of non-transactional and transcational
# tables. Specifically when drop temporary tables and create temporary tables
# are used.
###################################################################################
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc
--source extra/rpl_tests/rpl_drop_create_temp_table.test
###################################################################################
# This test cases evaluates the mixture of non-transactional and transcational
# tables. Specifically when drop temporary tables and create temporary tables
# are used.
###################################################################################
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb.inc
--source extra/rpl_tests/rpl_drop_create_temp_table.test
###################################################################################
# This test cases evaluates the mixture of non-transactional and transcational
# tables. Specifically when drop temporary tables and create temporary tables
# are used.
###################################################################################
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc
--source extra/rpl_tests/rpl_drop_create_temp_table.test
################################################################################
# BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a
# transaction
# BUG#52616 Temp table prevents switch binlog format from STATEMENT to ROW
#
# This test verifies what follows:
#
# 1 - If the following statements are classified as unsafe:
# 1.1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
# 1.2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
#
# 2 - If the following statements are classified as safe:
# 1.7 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp
# 1.8 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb
#
# 3 - If we can switch from statement to row format.
#
# 4 - If statements that can manipulate a temporary table and do not cause an
# implicit commit are kept in the boundaries of an on-going transaction. For
# instance:
# 4.1 - CREATE TEMPORARY TABLE
# 4.2 - CREATE TEMPORARY TABLE LIKE
# 4.3 - CREATE TEMPORARY TABLE SELECT * FROM
# 4.4 - INSERT/UPDATE/DELETE (Note that only inserts are verified)
# 4.5 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
# 4.6 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
# 4.7 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp
# 4.8 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb
#
# 5 - If transactions that have a DROP TEMPORARY are always written to the
# binary log regardless of the mode and the outcome: commit or rollback.
#
# 6 - In particular, if the current statement logging format is set to row
# the CREATE TEMPORARY is not logged and the DROP TEMPORARY is extended with
# the IF EXISTS clause.
#
# 7 - It verifies if the CONNECTION_ID along with a non-transactional
# table is written outside the transaction boundaries and is not classified
# as unsafe. See BUG#53075.
#
# 8 - It verifies if OPTION_KEEP_LOG is set and thus forcing to write the
# trx-cache to the binary log when an rollback is issued and only trx-tables
# were updated. See BUG#53421.
################################################################################
source include/master-slave.inc;
source include/have_binlog_format_statement.inc;
source include/have_innodb.inc;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
--echo ########################################################################
--echo # VERIFY ITEMS 1 and 2
--echo ########################################################################
--echo #
--echo # Create temporary tables to verify when statements involving temporary
--echo # tables are classified as safe or unsafe by printing out the warning
--echo # messages.
--echo #
connection master;
CREATE TABLE t_myisam(id int) engine= MyIsam;
INSERT INTO t_myisam VALUES(1);
CREATE TABLE t_innodb(id int) engine= Innodb;
INSERT INTO t_innodb VALUES(1);
CREATE TEMPORARY TABLE t_myisam_temp(id int) engine= MyIsam;
INSERT INTO t_myisam_temp VALUES(1);
CREATE TEMPORARY TABLE t_innodb_temp(id int) engine= Innodb;
INSERT INTO t_innodb_temp VALUES(1);
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
BEGIN;
INSERT INTO t_myisam SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_innodb_temp;
ROLLBACK;
BEGIN;
INSERT INTO t_myisam SELECT * FROM t_innodb_temp;
INSERT INTO t_innodb SELECT * FROM t_myisam_temp;
INSERT INTO t_innodb SELECT * FROM t_innodb_temp;
ROLLBACK;
--echo ########################################################################
--echo # VERIFY ITEM 3
--echo ########################################################################
--echo #
--echo # When there is a temporary table we can switch between the mixed and
--echo # row formats. However, we cannot switch to the statement format.
--echo #
SET BINLOG_FORMAT=MIXED;
SET BINLOG_FORMAT=ROW;
SET BINLOG_FORMAT=MIXED;
--error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
SET BINLOG_FORMAT=STATEMENT;
--echo #
--echo # When there is a temporary table we can switch between the mixed and
--echo # row formats. However, we cannot swith to the statement format.
--echo #
SET BINLOG_FORMAT=MIXED;
DROP TABLE t_myisam_temp, t_innodb_temp, t_myisam, t_innodb;
source include/show_binlog_events.inc;
--echo ########################################################################
--echo # VERIFY ITEMS 4 and 5
--echo ########################################################################
--echo #
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
BEGIN;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
INSERT INTO tmp1 VALUES(1);
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
INSERT INTO tmp2 VALUES(1);
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp1;
DROP TEMPORARY TABLE tmp2;
DROP TEMPORARY TABLE tmp3;
COMMIT;
source include/show_binlog_events.inc;
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
BEGIN;
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
INSERT INTO tmp1 VALUES(1);
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
INSERT INTO tmp2 VALUES(1);
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp1;
DROP TEMPORARY TABLE tmp2;
DROP TEMPORARY TABLE tmp3;
ROLLBACK;
source include/show_binlog_events.inc;
--echo ########################################################################
--echo # VERIFY ITEM 6
--echo ########################################################################
SET BINLOG_FORMAT=STATEMENT;
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
SET BINLOG_FORMAT=ROW;
DROP TEMPORARY TABLE tmp1;
BEGIN;
INSERT INTO tmp2 VALUES(1);
DROP TEMPORARY TABLE tmp2;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp3;
COMMIT;
source include/show_binlog_events.inc;
SET BINLOG_FORMAT=STATEMENT;
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TEMPORARY TABLE tmp2 LIKE tmp1;
CREATE TEMPORARY TABLE tmp3 engine= MyIsam SELECT * FROM tmp1;
SET BINLOG_FORMAT=ROW;
DROP TEMPORARY TABLE tmp1;
BEGIN;
INSERT INTO tmp2 VALUES(1);
DROP TEMPORARY TABLE tmp2;
INSERT INTO tmp3 VALUES(1);
DROP TEMPORARY TABLE tmp3;
ROLLBACK;
source include/show_binlog_events.inc;
--echo ########################################################################
--echo # VERIFY ITEM 7
--echo ########################################################################
SET BINLOG_FORMAT=STATEMENT;
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
CREATE TEMPORARY TABLE tmp1(id int) engine= MyIsam;
CREATE TABLE t_myisam (f1 BIGINT) ENGINE = MyISAM;
CREATE TABLE t_innodb (f1 BIGINT) ENGINE = Innodb;
BEGIN;
INSERT INTO t_myisam VALUES(CONNECTION_ID());
INSERT INTO tmp1 VALUES(1);
INSERT INTO t_myisam VALUES(1);
INSERT INTO t_innodb VALUES(1);
INSERT INTO t_myisam VALUES(CONNECTION_ID());
INSERT INTO t_innodb VALUES(1);
COMMIT;
source include/show_binlog_events.inc;
--echo ########################################################################
--echo # VERIFY ITEM 8
--echo ########################################################################
#
# Before the patch for BUG#53421, nothing were written to the binary log on
# behalf of the transaction presented below:
#
SET BINLOG_FORMAT=MIXED;
let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
BEGIN;
CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb;
INSERT INTO t_innodb VALUES(1);
INSERT INTO t_innodb VALUES(1);
ROLLBACK;
source include/show_binlog_events.inc;
--echo ###################################################################################
--echo # CHECK CONSISTENCY
--echo ###################################################################################
sync_slave_with_master;
connection master;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql
--diff_files $MYSQLTEST_VARDIR/tmp/test-nmt-master.sql $MYSQLTEST_VARDIR/tmp/test-nmt-slave.sql
--echo ###################################################################################
--echo # CLEAN UP
--echo ###################################################################################
connection master;
DROP TABLE t_myisam;
DROP TABLE t_innodb;
sync_slave_with_master;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment