List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:July 6 2010 9:17am
Subject:bzr commit into mysql-trunk-runtime branch (jon.hauglid:3077)
View as plain text  
#At file:///export/home/x/mysql-trunk-runtime-test/ based on revid:jon.hauglid@stripped

 3077 Jon Olav Hauglid	2010-07-06 [merge]
      merge from mysql-trunk-bugfixing

    removed:
      mysql-test/suite/rpl/r/rpl_temp_temporary.result
      mysql-test/suite/rpl/t/rpl_temp_temporary-master.opt
      mysql-test/suite/rpl/t/rpl_temp_temporary.test
    added:
      mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc
      mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test
      mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
      mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
      mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test
      mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test
      mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test
    modified:
      cmake/install_macros.cmake
      include/mysql.h.pp
      include/typelib.h
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/r/information_schema.result
      mysql-test/r/sp_trans_log.result
      mysql-test/suite/binlog/r/binlog_multi_engine.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
      mysql-test/suite/funcs_1/r/is_engines_myisam.result
      mysql-test/suite/ndb/r/ndb_binlog_format.result
      mysql-test/suite/ndb/t/disabled.def
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
      mysql-test/suite/rpl/r/rpl_concurrency_error.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
      mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test
      mysql-test/suite/rpl_ndb/t/disabled.def
      mysql-test/t/disabled.def
      mysql-test/t/innodb_mysql_lock2.test
      mysql-test/t/sp_trans_log.test
      mysys/stacktrace.c
      packaging/WiX/CPackWixConfig.cmake
      sql/CMakeLists.txt
      sql/log.cc
      sql/log.h
      sql/log_event.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_parse.cc
      sql/sys_vars.cc
      storage/myisam/ha_myisam.cc
=== modified file 'cmake/install_macros.cmake'
--- a/cmake/install_macros.cmake	2010-06-18 15:04:15 +0000
+++ b/cmake/install_macros.cmake	2010-06-30 12:10:29 +0000
@@ -250,7 +250,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/d
 
 FUNCTION(INSTALL_DEBUG_TARGET target)
  CMAKE_PARSE_ARGUMENTS(ARG
-  "DESTINATION;RENAME"
+  "DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
   ""
   ${ARGN}
   )
@@ -269,6 +269,9 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
   ELSE()
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug"  debug_target_location "${target_location}" )
   ENDIF()
+  IF(NOT ARG_COMPONENT)
+    SET(ARG_COMPONENT DebugBinaries)
+  ENDIF()
   
   # Define permissions
   # For executable files
@@ -305,19 +308,26 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
     ${RENAME_PARAM}
     ${PERMISSIONS_${target_type}}
     CONFIGURATIONS Release RelWithDebInfo
+    COMPONENT ${ARG_COMPONENT}
     OPTIONAL)
 
   IF(MSVC)
     GET_FILENAME_COMPONENT(ext ${debug_target_location} EXT)
     STRING(REPLACE "${ext}" ".pdb"  debug_pdb_target_location "${debug_target_location}" )
-    IF(RENAME_PARAM)
-      STRING(REPLACE "${ext}" ".pdb"  "${ARG_RENAME}" pdb_rename)
-      SET(PDB_RENAME_PARAM RENAME ${pdb_rename})
+    IF (RENAME_PARAM)
+      IF(NOT ARG_PDB_DESTINATION)
+        STRING(REPLACE "${ext}" ".pdb"  "${ARG_RENAME}" pdb_rename)
+        SET(PDB_RENAME_PARAM RENAME "${pdb_rename}")
+      ENDIF()
+    ENDIF()
+    IF(NOT ARG_PDB_DESTINATION)
+      SET(ARG_PDB_DESTINATION "${ARG_DESTINATION}")
     ENDIF()
     INSTALL(FILES ${debug_pdb_target_location}
-      DESTINATION ${ARG_DESTINATION}
-      ${RPDB_RENAME_PARAM}
+      DESTINATION ${ARG_PDB_DESTINATION}
+      ${PDB_RENAME_PARAM}
       CONFIGURATIONS Release RelWithDebInfo
+      COMPONENT ${ARG_COMPONENT}
       OPTIONAL)
   ENDIF()
 ENDFUNCTION()

=== modified file 'include/mysql.h.pp'
--- a/include/mysql.h.pp	2010-06-05 19:39:03 +0000
+++ b/include/mysql.h.pp	2010-07-05 21:00:56 +0000
@@ -233,10 +233,10 @@ extern void make_type(char *to,unsigned 
 extern const char *get_type(TYPELIB *typelib,unsigned int nr);
 extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
 extern TYPELIB sql_protocol_typelib;
-my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
+my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
                               my_ulonglong cur_set, my_ulonglong default_set,
-                              const char *str, uint length,
-                              char **err_pos, uint *err_len);
+                              const char *str, unsigned int length,
+                              char **err_pos, unsigned int *err_len);
 typedef struct st_mysql_rows {
   struct st_mysql_rows *next;
   MYSQL_ROW data;

=== modified file 'include/typelib.h'
--- a/include/typelib.h	2009-12-22 09:35:56 +0000
+++ b/include/typelib.h	2010-07-05 16:20:46 +0000
@@ -36,9 +36,9 @@ extern TYPELIB *copy_typelib(MEM_ROOT *r
 
 extern TYPELIB sql_protocol_typelib;
 
-my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
+my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
                               my_ulonglong cur_set, my_ulonglong default_set,
-                              const char *str, uint length,
-                              char **err_pos, uint *err_len);
+                              const char *str, unsigned int length,
+                              char **err_pos, unsigned int *err_len);
 
 #endif /* _typelib_h */

=== modified file 'mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test'
--- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2010-04-28 12:47:49 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2010-06-30 15:25:13 +0000
@@ -77,11 +77,11 @@ eval UPDATE t2, t1 SET t2.data = CONCAT(
 connection slave;
 --source include/wait_for_slave_sql_to_stop.inc
 
-if (`SELECT @@binlog_format = 'STATEMENT'`)
+if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
 {
   SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
 }
-if (`SELECT @@binlog_format = 'ROW' || @@binlog_format = 'MIXED'`)
+if (`SELECT @@binlog_format = 'ROW'`)
 {
   SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
 }

=== added file 'mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc'
--- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc	2010-06-30 19:37:41 +0000
@@ -0,0 +1,967 @@
+--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
+}

=== added file 'mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test'
--- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test	2010-06-30 19:37:41 +0000
@@ -0,0 +1,389 @@
+###############################################################################
+#  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

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-02-20 10:07:32 +0000
+++ b/mysql-test/r/information_schema.result	2010-07-05 07:34:29 +0000
@@ -1427,7 +1427,7 @@ USE test;
 End of 5.0 tests.
 select * from information_schema.engines WHERE ENGINE="MyISAM";
 ENGINE	SUPPORT	COMMENT	TRANSACTIONS	XA	SAVEPOINTS
-MyISAM	DEFAULT	Default engine as of MySQL 3.23 with great performance	NO	NO	NO
+MyISAM	DEFAULT	MyISAM storage engine	NO	NO	NO
 grant select on *.* to user3148@localhost;
 select user,db from information_schema.processlist;
 user	db

=== modified file 'mysql-test/r/sp_trans_log.result'
--- a/mysql-test/r/sp_trans_log.result	2010-05-26 14:34:25 +0000
+++ b/mysql-test/r/sp_trans_log.result	2010-07-04 19:35:05 +0000
@@ -14,7 +14,7 @@ end|
 reset master|
 insert into t2 values (bug23333(),1)|
 ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-show binlog events from <binlog_start>|
+show binlog events from <binlog_start> limit 0, 4|
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)

=== modified file 'mysql-test/suite/binlog/r/binlog_multi_engine.result'
--- a/mysql-test/suite/binlog/r/binlog_multi_engine.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result	2010-06-30 15:25:13 +0000
@@ -7,8 +7,6 @@ SET SESSION BINLOG_FORMAT=STATEMENT;
 INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
 INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
 UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 The last event before the COMMIT is use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
 *** Please look in binlog_multi_engine.test if you have a diff here ****
 START TRANSACTION;
@@ -73,6 +71,9 @@ mysqld-bin.000001	#	Table_map	#	#	table_
 mysqld-bin.000001	#	Write_rows	#	#	table_id: #
 mysqld-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
 mysqld-bin.000001	#	Query	#	#	COMMIT
+mysqld-bin.000001	#	Query	#	#	BEGIN
+mysqld-bin.000001	#	Query	#	#	use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
+mysqld-bin.000001	#	Query	#	#	COMMIT
 mysqld-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1m
 mysqld-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1b
 mysqld-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1n

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2010-05-26 14:34:25 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2010-06-30 15:25:13 +0000
@@ -635,7 +635,9 @@ COERCIBILITY(NAME_CONST('s1', _utf8'test
 COERCIBILITY(s1) d3;
 DROP TEMPORARY TABLE tmp1;
 END
-master-bin.000001	#	Query	#	#	use `bug39182`; DROP TEMPORARY TABLE IF EXISTS `tmp1` /* generated by server */
+master-bin.000001	#	Query	#	#	use `bug39182`; CREATE TEMPORARY TABLE tmp1
+SELECT * FROM t1 WHERE a LIKE CONCAT("%",  NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
+master-bin.000001	#	Query	#	#	use `bug39182`; DROP TEMPORARY TABLE tmp1
 DROP PROCEDURE p1;
 DROP TABLE t1;
 DROP DATABASE bug39182;

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result	2010-06-30 15:25:13 +0000
@@ -110,8 +110,6 @@ delete from t2;
 reset master;
 insert into t1 values(9);
 insert into t2 select * from t1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
@@ -126,8 +124,6 @@ reset master;
 insert into t1 values(10);
 begin;
 insert into t2 select * from t1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
@@ -245,8 +241,6 @@ Warnings:
 Warning	1196	Some non-transactional changed tables couldn't be rolled back
 create table t0 (n int);
 insert t0 select * from t1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 set autocommit=1;
 insert into t0 select GET_LOCK("lock1",null);
 Warnings:
@@ -288,7 +282,7 @@ master-bin.000001	#	Query	#	#	use `test`
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert t1 values (1)
-master-bin.000001	#	Query	#	#	ROLLBACK
+master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; create table t0 (n int)
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; insert t0 select * from t1

=== modified file 'mysql-test/suite/funcs_1/r/is_engines_myisam.result'
--- a/mysql-test/suite/funcs_1/r/is_engines_myisam.result	2008-03-07 19:18:14 +0000
+++ b/mysql-test/suite/funcs_1/r/is_engines_myisam.result	2010-07-05 07:34:29 +0000
@@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines
 WHERE ENGINE = 'MyISAM';
 ENGINE	MyISAM
 SUPPORT	DEFAULT
-COMMENT	Default engine as of MySQL 3.23 with great performance
+COMMENT	MyISAM storage engine
 TRANSACTIONS	NO
 XA	NO
 SAVEPOINTS	NO

=== modified file 'mysql-test/suite/ndb/r/ndb_binlog_format.result'
--- a/mysql-test/suite/ndb/r/ndb_binlog_format.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/ndb/r/ndb_binlog_format.result	2010-06-30 15:25:13 +0000
@@ -8,8 +8,6 @@ SET SESSION BINLOG_FORMAT=STATEMENT;
 INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2);
 INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2);
 UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 START TRANSACTION;
 INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2);
 UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f;

=== modified file 'mysql-test/suite/ndb/t/disabled.def'
--- a/mysql-test/suite/ndb/t/disabled.def	2010-02-09 10:40:08 +0000
+++ b/mysql-test/suite/ndb/t/disabled.def	2010-07-02 06:23:00 +0000
@@ -10,8 +10,9 @@
 #
 ##############################################################################
 
-ndb_partition_error2      : Bug#40989 ndb_partition_error2 needs maintenance
+ndb_binlog_discover       : Bug#54851 2010-07-02 alik ndb.ndb_binlog_discover crashes the server
 ndb_condition_pushdown    : Bug#49746 2010-02-08 alik ndb_condition_pushdown fails in mysql-next-mr
+ndb_partition_error2      : Bug#40989 ndb_partition_error2 needs maintenance
 
 
 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open

=== modified file 'mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result'
--- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2010-05-07 11:10:40 +0000
+++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2010-06-30 15:25:13 +0000
@@ -72,8 +72,6 @@ before call db1.p1()
 INSERT INTO db1.t2 VALUES ('before call db1.p2()');
 BEGIN;
 CALL db1.p2();
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 ROLLBACK;
 INSERT INTO db1.t2 VALUES ('after call db1.p2()');
 SELECT * FROM db1.t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_concurrency_error.result'
--- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result	2010-06-30 15:25:13 +0000
@@ -29,8 +29,6 @@ UPDATE t SET f = 'magenta 2' WHERE f = '
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 INSERT INTO t VALUES (5 + (2 * 10),"brown");
 INSERT INTO n VALUES (now(),"brown");
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 ROLLBACK;
 Warnings:
@@ -58,8 +56,6 @@ UPDATE t SET f = 'dark blue 2' WHERE f =
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 INSERT INTO t VALUES (6 + (2 * 10),"brown");
 INSERT INTO n VALUES (now(),"brown");
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 COMMIT;
 show binlog events from <binlog_start>;
@@ -83,8 +79,6 @@ UPDATE t SET f = 'magenta 1' WHERE f = '
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 INSERT INTO t VALUES (5 + (1 * 10),"brown");
 INSERT INTO n VALUES (now(),"brown");
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 ROLLBACK;
 Warnings:
@@ -110,8 +104,6 @@ UPDATE t SET f = 'dark blue 1' WHERE f =
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 INSERT INTO t VALUES (6 + (1 * 10),"brown");
 INSERT INTO n VALUES (now(),"brown");
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 COMMIT;
 show binlog events from <binlog_start>;

=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2010-04-28 12:47:49 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2010-06-30 15:25:13 +0000
@@ -19,7 +19,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
 START SLAVE SQL_THREAD;
 *** Single statement on both transactional and non-transactional tables. ***
 Got one of the listed errors
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
 START SLAVE SQL_THREAD;
 source include/diff_master_slave.inc;
 ########################################################################################

=== added file 'mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result	2010-06-30 19:37:41 +0000
@@ -0,0 +1,1513 @@
+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= '';

=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result	2010-05-07 09:37:16 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result	2010-06-30 15:25:13 +0000
@@ -393,15 +393,13 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> 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.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -409,15 +407,13 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> nT << -b-b-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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -425,23 +421,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1;
 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_3)
-master-bin.000001	#	Update_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_3)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT << -b-b-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_3)
-master-bin.000001	#	Update_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_3)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -449,23 +435,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1);
 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_4)
-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-trig << -b-b-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_4)
-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -473,35 +449,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1));
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -509,23 +463,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1;
 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_4)
-master-bin.000001	#	Update_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_4)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> 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.nt_4)
-master-bin.000001	#	Update_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_4)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -533,23 +477,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1);
 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_3)
-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-trig << -b-b-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_3)
-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -557,35 +491,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1));
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -604,15 +516,13 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tNe << -b-b-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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -630,16 +540,14 @@ INSERT INTO nt_4(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-trig << -b-b-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -647,20 +555,14 @@ INSERT INTO nt_5(trans_id, stmt_id, info
 Got one of the listed errors
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-trig << -b-b-b-b-b-b-b-b-b-b-b-
@@ -668,16 +570,14 @@ INSERT INTO tt_3(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (35, 1), (29, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-trig << -b-b-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (35, 1), (29, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -685,24 +585,14 @@ INSERT INTO tt_5(trans_id, stmt_id, info
 Got one of the listed errors
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (36, 1, ''), (30, 1, fc_i_nt_5_suc (36, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (36, 1, ''), (30, 1, fc_i_nt_5_suc (36, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 
 
@@ -3711,8 +3601,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3725,8 +3614,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2)
@@ -3745,10 +3633,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3761,10 +3646,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2)
@@ -3785,12 +3667,7 @@ fc_i_nt_5_suc (135, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(135,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3803,12 +3680,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(135,4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2)
@@ -3827,16 +3699,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (136, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3849,16 +3715,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2)
@@ -3877,8 +3737,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3891,8 +3750,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2)
@@ -3911,10 +3769,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3927,10 +3782,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2)
@@ -3951,12 +3803,7 @@ fc_i_nt_5_suc (139, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(139,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -3969,12 +3816,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(139,4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2)
@@ -3993,16 +3835,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (140, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4015,16 +3851,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2)
@@ -4045,8 +3875,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4059,8 +3888,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(141,2)
@@ -4081,10 +3909,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4097,10 +3922,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(142,2)
@@ -4123,12 +3945,7 @@ fc_i_nt_5_suc (143, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(143,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4141,12 +3958,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(143,4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(143,2)
@@ -4167,16 +3979,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (144, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4189,16 +3995,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(144,2)
@@ -4217,8 +4017,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4232,8 +4031,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145),  NAME_CONST('in_stmt_id',1))
@@ -4253,10 +4051,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4270,10 +4065,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146),  NAME_CONST('in_stmt_id',1))
@@ -4295,12 +4087,7 @@ fc_i_nt_5_suc (147, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4314,12 +4101,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(147,4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147),  NAME_CONST('in_stmt_id',1))
@@ -4339,16 +4121,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (148, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4362,16 +4138,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148),  NAME_CONST('in_stmt_id',1))
@@ -4487,8 +4257,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4501,8 +4270,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T Ne 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2)
@@ -4531,8 +4299,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4544,8 +4311,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4561,10 +4327,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4576,10 +4339,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T N-trig R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4597,12 +4357,7 @@ fc_i_nt_5_suc (155, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4614,12 +4369,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T N-func R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4635,16 +4385,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (156, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4656,16 +4400,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T N-proc R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4681,8 +4419,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4694,8 +4431,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4711,10 +4447,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4726,10 +4459,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-trig R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4747,12 +4477,7 @@ fc_i_nt_5_suc (159, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4764,12 +4489,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-func R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4785,16 +4505,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (160, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4806,16 +4520,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-trig N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-trig N-proc R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4833,8 +4541,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4846,8 +4553,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4865,10 +4571,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4880,10 +4583,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-trig R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4903,12 +4603,7 @@ fc_i_nt_5_suc (163, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4920,12 +4615,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-func R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4943,16 +4633,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (164, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -4964,16 +4648,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-func N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-func N-proc R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -4989,8 +4667,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5002,8 +4679,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -5019,10 +4695,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5034,10 +4707,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-trig R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -5055,12 +4725,7 @@ fc_i_nt_5_suc (167, 4)
 fc_i_nt_5_suc
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5072,12 +4737,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-func R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -5093,16 +4753,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (168, 4);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5114,16 +4768,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T-proc N-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T-proc N-proc R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -5233,8 +4881,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5246,8 +4893,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B T Ne 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B T Ne R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -5673,16 +5319,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (185, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5699,16 +5339,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (185, 4)
@@ -5723,16 +5357,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (186, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5749,16 +5377,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES (186, 4)
@@ -5773,16 +5395,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (187, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5801,16 +5417,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(187,4)
@@ -5825,16 +5435,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (188, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b-
@@ -5852,16 +5456,10 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188),  NAME_CONST('in_stmt_id',1))
@@ -6237,16 +5835,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (201, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6262,16 +5854,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N-proc T R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -6283,16 +5869,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (202, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6308,16 +5888,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-proc 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N-proc T-proc R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -6329,16 +5903,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (203, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6354,16 +5922,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-trig 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N-proc T-trig R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -6375,16 +5937,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 CALL pc_i_nt_5_suc (204, 2);
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6402,16 +5958,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B N-proc T-func 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204),  NAME_CONST('in_stmt_id',1))
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204),  NAME_CONST('in_stmt_id',1) + 1)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N-proc T-func R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -6434,8 +5984,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6452,8 +6001,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4)
@@ -6762,8 +6310,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6780,8 +6327,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4)
@@ -6986,8 +6532,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -7003,8 +6548,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B tN T R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -7240,8 +6784,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -7257,8 +6800,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B tNe T R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -8439,8 +7981,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8457,8 +7998,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4)
@@ -8477,8 +8017,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8492,8 +8031,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B nT N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_1)
@@ -8517,8 +8055,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8536,8 +8073,7 @@ master-bin.000001	#	Table_map	#	#	table_
 master-bin.000001	#	Update_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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_3)
@@ -8561,8 +8097,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8580,8 +8115,7 @@ master-bin.000001	#	Table_map	#	#	table_
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_4)
@@ -8607,8 +8141,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8632,8 +8165,7 @@ master-bin.000001	#	Write_rows	#	#	table
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_5)
@@ -8661,8 +8193,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8680,8 +8211,7 @@ master-bin.000001	#	Table_map	#	#	table_
 master-bin.000001	#	Update_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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_4)
@@ -8705,8 +8235,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8724,8 +8253,7 @@ master-bin.000001	#	Table_map	#	#	table_
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_3)
@@ -8753,8 +8281,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8778,8 +8305,7 @@ master-bin.000001	#	Write_rows	#	#	table
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_5)
@@ -8810,8 +8336,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8828,8 +8353,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4)
@@ -9035,8 +8559,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9055,8 +8578,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4)
@@ -9075,8 +8597,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9088,8 +8609,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B nT N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B nT N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9109,8 +8629,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9126,8 +8645,7 @@ master-bin.000001	#	Table_map	#	#	table_
 master-bin.000001	#	Update_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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B NT N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9147,8 +8665,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9164,8 +8681,7 @@ master-bin.000001	#	Table_map	#	#	table_
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B NT-trig N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9187,8 +8703,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9206,8 +8721,7 @@ master-bin.000001	#	Write_rows	#	#	table
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B NT-func N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9227,8 +8741,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9244,8 +8757,7 @@ master-bin.000001	#	Table_map	#	#	table_
 master-bin.000001	#	Update_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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B TN N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9265,8 +8777,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9282,8 +8793,7 @@ master-bin.000001	#	Table_map	#	#	table_
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B TN-trig N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9307,8 +8817,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9328,8 +8837,7 @@ master-bin.000001	#	Write_rows	#	#	table
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B TN-func N R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9354,8 +8862,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9374,8 +8881,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4)
@@ -9597,8 +9103,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9611,8 +9116,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tN C << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9953,8 +9457,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9967,8 +9470,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tNe C << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -10177,8 +9679,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10193,8 +9694,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tN R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -10481,8 +9981,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10497,8 +9996,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tNe R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -10792,8 +10290,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> S1 << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10823,8 +10320,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T N S1 T R1 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2)
@@ -10850,8 +10346,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5);
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5)
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10877,8 +10372,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B T S1 N T R1 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2)
@@ -11931,8 +11425,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b-
@@ -11956,8 +11449,7 @@ master-bin.000001	#	Query	#	#	ROLLBACK
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN CT T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb

=== modified file 'mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result'
--- a/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result	2010-05-07 09:37:16 +0000
+++ b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result	2010-06-30 15:25:13 +0000
@@ -393,15 +393,13 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> 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.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -409,15 +407,13 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> nT << -b-b-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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -425,23 +421,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1;
 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_3)
-master-bin.000001	#	Update_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_3)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT << -b-b-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_3)
-master-bin.000001	#	Update_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_3)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -449,23 +435,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1);
 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_4)
-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-trig << -b-b-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_4)
-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -473,35 +449,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1));
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -509,23 +463,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1;
 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_4)
-master-bin.000001	#	Update_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_4)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> 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.nt_4)
-master-bin.000001	#	Update_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_4)
-master-bin.000001	#	Update_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -533,23 +477,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1);
 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_3)
-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-trig << -b-b-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_3)
-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1)
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -557,35 +491,13 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1));
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.tt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
 master-bin.000001	#	Xid	#	#	COMMIT /* XID */
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -604,15 +516,13 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tNe << -b-b-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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -630,16 +540,14 @@ INSERT INTO nt_4(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-trig << -b-b-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_4)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -647,20 +555,14 @@ INSERT INTO nt_5(trans_id, stmt_id, info
 Got one of the listed errors
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> NeT-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-trig << -b-b-b-b-b-b-b-b-b-b-b-
@@ -668,16 +570,14 @@ INSERT INTO tt_3(trans_id, stmt_id) VALU
 Got one of the listed errors
 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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (35, 1), (29, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-trig << -b-b-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_3)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_3(trans_id, stmt_id) VALUES (35, 1), (29, 1)
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-func << -b-b-b-b-b-b-b-b-b-b-b-
@@ -685,24 +585,14 @@ INSERT INTO tt_5(trans_id, stmt_id, info
 Got one of the listed errors
 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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (36, 1, ''), (30, 1, fc_i_nt_5_suc (36, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> TeN-func << -b-b-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_5)
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_6)
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: #
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	COMMIT
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (36, 1, ''), (30, 1, fc_i_nt_5_suc (36, 1))
+master-bin.000001	#	Query	#	#	ROLLBACK
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 
 
@@ -6434,8 +6324,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6452,8 +6341,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4)
@@ -6762,8 +6650,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -6780,8 +6667,7 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4)
@@ -6986,8 +6872,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -7003,8 +6888,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B tN T R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -7240,8 +7124,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b-
@@ -7257,8 +7140,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B tNe T R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -8439,8 +8321,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8457,8 +8338,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4)
@@ -8810,8 +8690,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -8828,8 +8707,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4)
@@ -9035,8 +8913,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9055,8 +8932,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4)
@@ -9354,8 +9230,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9374,8 +9249,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -b-b-b-b-b-b-b-b-b-b-b- >> B tNe N 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4)
@@ -9597,8 +9471,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9611,8 +9484,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tN C << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -9953,8 +9825,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> C << -b-b-b-b-b-b-b-b-b-b-b-
@@ -9967,8 +9838,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tNe C << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -10177,8 +10047,7 @@ master-bin.000001	#	Query	#	#	COMMIT
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10193,8 +10062,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tN R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -10481,8 +10349,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info
 Got one of the listed errors
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tNe << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> R << -b-b-b-b-b-b-b-b-b-b-b-
@@ -10497,8 +10364,7 @@ master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2)
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.nt_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> B N tNe R << -e-e-e-e-e-e-e-e-e-e-e-
 
@@ -11931,8 +11797,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1;
 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> tN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> CT << -b-b-b-b-b-b-b-b-b-b-b-
@@ -11956,8 +11821,7 @@ master-bin.000001	#	Query	#	#	ROLLBACK
 -b-b-b-b-b-b-b-b-b-b-b- >> B tN CT T 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_1)
-master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
+master-bin.000001	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb

=== modified file 'mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result'
--- a/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result	2010-06-30 15:25:13 +0000
@@ -391,8 +391,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 #
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
@@ -407,8 +405,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 
 -b-b-b-b-b-b-b-b-b-b-b- >> nT << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
@@ -423,8 +419,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT << -b-b-b-b-b-b-b-b-b-b-b-
 UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
@@ -439,8 +433,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_4(trans_id, stmt_id) VALUES (26, 1)
@@ -455,8 +447,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-func << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1));
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
@@ -471,8 +461,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN << -b-b-b-b-b-b-b-b-b-b-b-
 UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
@@ -487,8 +475,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_3(trans_id, stmt_id) VALUES (29, 1)
@@ -503,8 +489,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-func << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1));
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
@@ -6076,8 +6060,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
@@ -6518,8 +6500,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
@@ -7845,8 +7825,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
@@ -8311,8 +8289,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
@@ -8811,8 +8787,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
@@ -9297,8 +9271,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
@@ -10557,7 +10529,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1
@@ -10966,8 +10937,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1

=== added file 'mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result'
--- a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result	2010-06-30 19:37:41 +0000
@@ -0,0 +1,1539 @@
+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= '';

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2010-04-28 12:47:49 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2010-06-30 15:25:13 +0000
@@ -32,18 +32,12 @@ BEGIN;
 Got one of the listed errors
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 BEGIN;
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 BEGIN;
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 source include/diff_master_slave.inc;
 ########################################################################################
 #                                     3 - BEGIN - COMMIT
@@ -55,8 +49,6 @@ BEGIN;
 Got one of the listed errors
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 source include/diff_master_slave.inc;
 ########################################################################################
@@ -69,8 +61,6 @@ BEGIN;
 Got one of the listed errors
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 ROLLBACK;
 Warnings:
 Warning	1196	Some non-transactional changed tables couldn't be rolled back
@@ -109,8 +99,6 @@ BEGIN;
 Got one of the listed errors
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 ROLLBACK TO sv;
 Warnings:
 Warning	1196	Some non-transactional changed tables couldn't be rolled back
@@ -123,19 +111,11 @@ TRUNCATE TABLE t1;
 TRUNCATE TABLE t2;
 TRUNCATE TABLE t3;
 BEGIN;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 Got one of the listed errors
 Got one of the listed errors
 Got one of the listed errors
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 COMMIT;
 BEGIN;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 Got one of the listed errors
 COMMIT;
 source include/diff_master_slave.inc;

=== added file 'mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result	2010-06-30 19:37:41 +0000
@@ -0,0 +1,1513 @@
+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= '';

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result	2010-06-30 15:25:13 +0000
@@ -391,8 +391,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 #
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1
@@ -407,8 +405,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 
 -b-b-b-b-b-b-b-b-b-b-b- >> nT << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1
@@ -423,8 +419,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT << -b-b-b-b-b-b-b-b-b-b-b-
 UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1
@@ -439,8 +433,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_4(trans_id, stmt_id) VALUES (26, 1)
@@ -455,8 +447,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> NT-func << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1));
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1))
@@ -471,8 +461,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN << -b-b-b-b-b-b-b-b-b-b-b-
 UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	BEGIN
 master-bin.000001	#	Query	#	#	use `test`; UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1
@@ -487,8 +475,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_3(trans_id, stmt_id) VALUES (29, 1)
@@ -503,8 +489,6 @@ master-bin.000001	#	Xid	#	#	COMMIT /* XI
 
 -b-b-b-b-b-b-b-b-b-b-b- >> TN-func << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO tt_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1));
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_5(trans_id, stmt_id, info) VALUES (30, 1, fc_i_nt_5_suc(30, 1))
@@ -3615,8 +3599,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (133, 4)
@@ -3649,8 +3631,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (134, 4)
@@ -3755,8 +3735,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (137, 4)
@@ -3789,8 +3767,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (138, 4)
@@ -3897,8 +3873,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (141, 4)
@@ -3933,8 +3907,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (142, 4)
@@ -4043,8 +4015,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (145, 4)
@@ -4079,8 +4049,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (146, 4)
@@ -4329,8 +4297,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (153, 4)
@@ -4365,8 +4331,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (154, 4)
@@ -4477,8 +4441,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (157, 4)
@@ -4513,8 +4475,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (158, 4)
@@ -4627,8 +4587,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (161, 4)
@@ -4665,8 +4623,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (162, 4)
@@ -4781,8 +4737,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (165, 4)
@@ -4819,8 +4773,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_5(trans_id, stmt_id) VALUES (166, 4)
@@ -6244,8 +6196,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1
@@ -6686,8 +6636,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1
@@ -8029,8 +7977,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1
@@ -8069,8 +8015,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (262, 4)
@@ -8105,8 +8049,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (263, 4)
@@ -8141,8 +8083,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (264, 4)
@@ -8177,8 +8117,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (265, 4)
@@ -8213,8 +8151,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (266, 4)
@@ -8249,8 +8185,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (267, 4)
@@ -8285,8 +8219,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (268, 4)
@@ -8392,8 +8324,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (271, 4)
@@ -8427,8 +8357,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (272, 4)
@@ -8462,8 +8390,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (273, 4)
@@ -8497,8 +8423,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (274, 4)
@@ -8539,8 +8463,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1
@@ -8581,8 +8503,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> nT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (276, 4)
@@ -8619,8 +8539,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (277, 4)
@@ -8657,8 +8575,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (278, 4)
@@ -8695,8 +8611,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (279, 4)
@@ -8733,8 +8647,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (280, 4)
@@ -8771,8 +8683,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (281, 4)
@@ -8809,8 +8719,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (282, 4)
@@ -8922,8 +8830,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (285, 4)
@@ -8959,8 +8865,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> NeT-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (286, 4)
@@ -8996,8 +8900,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-trig << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (287, 4)
@@ -9033,8 +8935,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> TeN-func << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (288, 4)
@@ -9083,8 +8983,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1
@@ -9569,8 +9467,6 @@ master-bin.000001	#	Query	#	#	COMMIT
 -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1
@@ -10158,8 +10054,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (319, 4)
@@ -10216,8 +10110,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> S1 << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_1(trans_id, stmt_id) VALUES (320, 5)
@@ -10845,7 +10737,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1
@@ -10949,7 +10840,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1;;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 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_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1
@@ -11262,8 +11152,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
 -e-e-e-e-e-e-e-e-e-e-e- >> B << -e-e-e-e-e-e-e-e-e-e-e-
 -b-b-b-b-b-b-b-b-b-b-b- >> tN << -b-b-b-b-b-b-b-b-b-b-b-
 INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 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_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result	2010-06-30 15:25:13 +0000
@@ -52,8 +52,6 @@ include/start_slave.inc
 set @@global.debug="+d,stop_slave_middle_group";
 set @@global.debug="+d,incomplete_group_in_relay_log";
 update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
 SELECT "Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
 Last_SQL_Error	true
 Fatal error: ... The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed. If the group consists solely of Row-based events, you can try restarting the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details).	1

=== removed file 'mysql-test/suite/rpl/r/rpl_temp_temporary.result'
--- a/mysql-test/suite/rpl/r/rpl_temp_temporary.result	2010-06-01 23:25:08 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temp_temporary.result	1970-01-01 00:00:00 +0000
@@ -1,240 +0,0 @@
-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;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
-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;
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
-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	#	#	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	#	#	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);
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
-INSERT INTO t_innodb VALUES(1);
-INSERT INTO t_myisam VALUES(CONNECTION_ID());
-Warnings:
-Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
-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 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 tmp1 VALUES(1)
-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;

=== added file 'mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test'
--- a/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mixed_drop_create_temp_table.test	2010-06-30 19:37:41 +0000
@@ -0,0 +1,10 @@
+###################################################################################
+# 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

=== modified file 'mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test'
--- a/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test	2010-03-31 13:49:20 +0000
+++ b/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test	2010-06-30 15:25:13 +0000
@@ -11,5 +11,3 @@ SET SESSION binlog_direct_non_transactio
 --enable_query_log
 let $engine_type=Innodb;
 --source extra/rpl_tests/rpl_mixing_engines.test
-
---diff_files suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result suite/rpl/r/rpl_mixed_mixing_engines.result

=== added file 'mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test'
--- a/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_drop_create_temp_table.test	2010-06-30 19:37:41 +0000
@@ -0,0 +1,10 @@
+###################################################################################
+# 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

=== added file 'mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test	2010-06-30 19:37:41 +0000
@@ -0,0 +1,10 @@
+###################################################################################
+# 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

=== removed file 'mysql-test/suite/rpl/t/rpl_temp_temporary-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_temp_temporary-master.opt	2010-06-20 20:43:34 +0000
+++ b/mysql-test/suite/rpl/t/rpl_temp_temporary-master.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---default-storage-engine=MyISAM

=== removed file 'mysql-test/suite/rpl/t/rpl_temp_temporary.test'
--- a/mysql-test/suite/rpl/t/rpl_temp_temporary.test	2010-06-01 14:39:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_temp_temporary.test	1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
-################################################################################
-# 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;

=== modified file 'mysql-test/suite/rpl_ndb/t/disabled.def'
--- a/mysql-test/suite/rpl_ndb/t/disabled.def	2009-07-06 15:17:39 +0000
+++ b/mysql-test/suite/rpl_ndb/t/disabled.def	2010-07-02 06:23:00 +0000
@@ -10,5 +10,8 @@
 #
 ##############################################################################
 
+rpl_ndb_stm_innodb  : Bug#54850 2010-07-02 alik rpl_ndb.rpl_ndb_stm_innodb and rpl_ndb.rpl_ndb_2other fails
+rpl_ndb_2other      : Bug#54850 2010-07-02 alik rpl_ndb.rpl_ndb_stm_innodb and rpl_ndb.rpl_ndb_2other fails
+
 # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
 rpl_ndb_2ndb   : Bug#45974: rpl_ndb_2ndb fails sporadically

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2010-06-07 08:47:04 +0000
+++ b/mysql-test/t/disabled.def	2010-06-30 09:27:38 +0000
@@ -10,9 +10,10 @@
 #
 ##############################################################################
 kill                     : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
-query_cache_28249        : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
-sp_sync                  : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution
-plugin_load              : Bug#42144 2009-12-21 alik plugin_load fails
-partition_innodb_plugin  : Bug#53307 2010-04-30 VasilDimov valgrind warnings
+lowercase_table3         : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX
 mysqlhotcopy_myisam      : bug#54129 2010-06-04 Horst
 mysqlhotcopy_archive     : bug#54129 2010-06-04 Horst
+plugin_load              : Bug#42144 2009-12-21 alik plugin_load fails
+partition_innodb_plugin  : Bug#53307 2010-04-30 VasilDimov valgrind warnings
+query_cache_28249        : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
+sp_sync                  : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution

=== modified file 'mysql-test/t/innodb_mysql_lock2.test'
--- a/mysql-test/t/innodb_mysql_lock2.test	2010-06-17 13:31:51 +0000
+++ b/mysql-test/t/innodb_mysql_lock2.test	2010-06-30 15:25:13 +0000
@@ -12,6 +12,10 @@
 # Save the initial number of concurrent sessions.
 --source include/count_sessions.inc
 
+--disable_query_log
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+--enable_query_log
+
 --echo #
 --echo # Test how do we handle locking in various cases when
 --echo # we read data from InnoDB tables.

=== modified file 'mysql-test/t/sp_trans_log.test'
--- a/mysql-test/t/sp_trans_log.test	2010-05-26 14:34:25 +0000
+++ b/mysql-test/t/sp_trans_log.test	2010-07-04 19:35:05 +0000
@@ -34,7 +34,10 @@ end|
 reset master|
 --error ER_DUP_ENTRY
 insert into t2 values (bug23333(),1)| 
-# the following must show there is (are) events after the query */
+# the following must show there are events after the query
+# the binlog_limit is used to hide the differences between the mixed
+# and row logging formats after BUG#53259
+let $binlog_limit= 0, 4|
 source include/show_binlog_events.inc|
 select count(*),@a from t1 /* must be 1,1 */|
 

=== modified file 'mysys/stacktrace.c'
--- a/mysys/stacktrace.c	2010-01-30 21:26:38 +0000
+++ b/mysys/stacktrace.c	2010-06-30 12:10:29 +0000
@@ -334,44 +334,9 @@ void my_write_core(int sig)
 
 #include <dbghelp.h>
 #include <tlhelp32.h>
-
-/*
-  Stack tracing on Windows is implemented using Debug Helper library(dbghelp.dll)
-  We do not redistribute dbghelp and the one comes with older OS (up to Windows 2000)
-  is missing some important functions like functions StackWalk64 or MinidumpWriteDump.
-  Hence, we have to load functions at runtime using LoadLibrary/GetProcAddress.
-*/
-
-typedef DWORD (WINAPI *SymSetOptions_FctType)(DWORD dwOptions);
-typedef BOOL  (WINAPI *SymGetModuleInfo64_FctType)
-  (HANDLE,DWORD64,PIMAGEHLP_MODULE64) ;
-typedef BOOL  (WINAPI *SymGetSymFromAddr64_FctType)
-  (HANDLE,DWORD64,PDWORD64,PIMAGEHLP_SYMBOL64) ;
-typedef BOOL  (WINAPI *SymGetLineFromAddr64_FctType)
-  (HANDLE,DWORD64,PDWORD,PIMAGEHLP_LINE64);
-typedef BOOL  (WINAPI *SymInitialize_FctType)
-  (HANDLE,PSTR,BOOL);
-typedef BOOL  (WINAPI *StackWalk64_FctType)
-  (DWORD,HANDLE,HANDLE,LPSTACKFRAME64,PVOID,PREAD_PROCESS_MEMORY_ROUTINE64,
-  PFUNCTION_TABLE_ACCESS_ROUTINE64,PGET_MODULE_BASE_ROUTINE64 ,
-  PTRANSLATE_ADDRESS_ROUTINE64);
-typedef BOOL (WINAPI *MiniDumpWriteDump_FctType)(
-    IN HANDLE hProcess,
-    IN DWORD ProcessId,
-    IN HANDLE hFile,
-    IN MINIDUMP_TYPE DumpType,
-    IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL
-    IN CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, OPTIONAL
-    IN CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam OPTIONAL
-    );
-
-static SymSetOptions_FctType           pSymSetOptions;
-static SymGetModuleInfo64_FctType      pSymGetModuleInfo64;
-static SymGetSymFromAddr64_FctType     pSymGetSymFromAddr64;
-static SymInitialize_FctType           pSymInitialize;
-static StackWalk64_FctType             pStackWalk64;
-static SymGetLineFromAddr64_FctType    pSymGetLineFromAddr64;
-static MiniDumpWriteDump_FctType       pMiniDumpWriteDump;
+#if _MSC_VER
+#pragma comment(lib, "dbghelp")
+#endif
 
 static EXCEPTION_POINTERS *exception_ptrs;
 
@@ -382,50 +347,24 @@ void my_init_stacktrace()
 {
 }
 
-/*
-  Dynamically load dbghelp functions
-*/
-BOOL init_dbghelp_functions()
-{
-  static BOOL first_time= TRUE;
-  static BOOL rc;
-  HMODULE hDbghlp;
-
-  if(first_time)
-  {
-    first_time= FALSE;
-    hDbghlp= LoadLibrary("dbghelp");
-    if(!hDbghlp)
-    {
-      rc= FALSE;
-      return rc;
-    }
-    pSymSetOptions= (SymSetOptions_FctType)
-      GetProcAddress(hDbghlp,"SymSetOptions");
-    pSymInitialize= (SymInitialize_FctType)
-      GetProcAddress(hDbghlp,"SymInitialize");
-    pSymGetModuleInfo64= (SymGetModuleInfo64_FctType)
-      GetProcAddress(hDbghlp,"SymGetModuleInfo64");
-    pSymGetLineFromAddr64= (SymGetLineFromAddr64_FctType)
-      GetProcAddress(hDbghlp,"SymGetLineFromAddr64");
-    pSymGetSymFromAddr64=(SymGetSymFromAddr64_FctType)
-      GetProcAddress(hDbghlp,"SymGetSymFromAddr64");
-    pStackWalk64= (StackWalk64_FctType)
-      GetProcAddress(hDbghlp,"StackWalk64");
-    pMiniDumpWriteDump = (MiniDumpWriteDump_FctType)
-      GetProcAddress(hDbghlp,"MiniDumpWriteDump");
-
-    rc = (BOOL)(pSymSetOptions && pSymInitialize && pSymGetModuleInfo64
-    && pSymGetLineFromAddr64 && pSymGetSymFromAddr64 && pStackWalk64);
-  }
-  return rc;
-}
 
 void my_set_exception_pointers(EXCEPTION_POINTERS *ep)
 {
   exception_ptrs = ep;
 }
 
+/*
+  Appends directory to symbol path.
+*/
+static void add_to_symbol_path(char *path, size_t path_buffer_size, 
+  char *dir, size_t dir_buffer_size)
+{
+  strcat_s(dir, dir_buffer_size, ";");
+  if (!strstr(path, dir))
+  {
+    strcat_s(path, path_buffer_size, dir);
+  }
+}
 
 /*
   Get symbol path - semicolon-separated list of directories to search for debug
@@ -437,8 +376,28 @@ static void get_symbol_path(char *path, 
 { 
   HANDLE hSnap; 
   char *envvar;
+  char *p;
+#ifndef DBUG_OFF
+  static char pdb_debug_dir[MAX_PATH + 7];
+#endif
 
   path[0]= '\0';
+
+#ifndef DBUG_OFF
+  /* 
+    Add "debug" subdirectory of the application directory, sometimes PDB will 
+    placed here by installation.
+  */
+  GetModuleFileName(NULL, pdb_debug_dir, MAX_PATH);
+  p= strrchr(pdb_debug_dir, '\\');
+  if(p)
+  { 
+    *p= 0;
+    strcat_s(pdb_debug_dir, sizeof(pdb_debug_dir), "\\debug;");
+    add_to_symbol_path(path, size, pdb_debug_dir, sizeof(pdb_debug_dir));
+  }
+#endif
+
   /*
     Enumerate all modules, and add their directories to the path.
     Avoid duplicate entries.
@@ -452,7 +411,7 @@ static void get_symbol_path(char *path, 
     for (ret= Module32First(hSnap, &mod); ret; ret= Module32Next(hSnap, &mod))
     {
       char *module_dir= mod.szExePath;
-      char *p= strrchr(module_dir,'\\');
+      p= strrchr(module_dir,'\\');
       if (!p)
       {
         /*
@@ -460,29 +419,23 @@ static void get_symbol_path(char *path, 
           will indicate current directory.
         */
         module_dir[0]= '.';
-        p= module_dir + 1;
+        module_dir[1]= '\0';
       }
-      *p++= ';';
-      *p= '\0';
-
-      if (!strstr(path, module_dir))
+      else
       {
-        size_t dir_len = strlen(module_dir);
-        if (size > dir_len)
-        {
-          strncat(path, module_dir, size-1);
-          size -= dir_len;
-        }
+        *p= '\0';
       }
+      add_to_symbol_path(path, size, module_dir,sizeof(mod.szExePath));
     }
     CloseHandle(hSnap);
   }
 
+  
   /* Add _NT_SYMBOL_PATH, if present. */
   envvar= getenv("_NT_SYMBOL_PATH");
-  if(envvar && size)
+  if(envvar)
   {
-    strncat(path, envvar, size-1);
+    strcat_s(path, size, envvar);
   }
 }
 
@@ -506,15 +459,15 @@ void my_print_stacktrace(uchar* unused1,
   STACKFRAME64 frame={0};
   static char symbol_path[MAX_SYMBOL_PATH];
 
-  if(!exception_ptrs || !init_dbghelp_functions())
+  if(!exception_ptrs)
     return;
 
   /* Copy context, as stackwalking on original will unwind the stack */
   context = *(exception_ptrs->ContextRecord);
   /*Initialize symbols.*/
-  pSymSetOptions(SYMOPT_LOAD_LINES|SYMOPT_NO_PROMPTS|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG);
+  SymSetOptions(SYMOPT_LOAD_LINES|SYMOPT_NO_PROMPTS|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG);
   get_symbol_path(symbol_path, sizeof(symbol_path));
-  pSymInitialize(hProcess, symbol_path, TRUE);
+  SymInitialize(hProcess, symbol_path, TRUE);
 
   /*Prepare stackframe for the first StackWalk64 call*/
   frame.AddrFrame.Mode= frame.AddrPC.Mode= frame.AddrStack.Mode= AddrModeFlat;
@@ -546,11 +499,11 @@ void my_print_stacktrace(uchar* unused1,
     BOOL have_symbol= FALSE;
     BOOL have_source= FALSE;
 
-    if(!pStackWalk64(machine, hProcess, hThread, &frame, &context, 0, 0, 0 ,0))
+    if(!StackWalk64(machine, hProcess, hThread, &frame, &context, 0, 0, 0 ,0))
       break;
     addr= frame.AddrPC.Offset;
 
-    have_module= pSymGetModuleInfo64(hProcess,addr,&module);
+    have_module= SymGetModuleInfo64(hProcess,addr,&module);
 #ifdef _M_IX86
     if(!have_module)
     {
@@ -560,13 +513,13 @@ void my_print_stacktrace(uchar* unused1,
         happy, pretend passing the old structure.
       */
       module.SizeOfStruct= MODULE64_SIZE_WINXP;
-      have_module= pSymGetModuleInfo64(hProcess, addr, &module);
+      have_module= SymGetModuleInfo64(hProcess, addr, &module);
     }
 #endif
 
-    have_symbol= pSymGetSymFromAddr64(hProcess, addr, &function_offset,
+    have_symbol= SymGetSymFromAddr64(hProcess, addr, &function_offset,
       &(package.sym));
-    have_source= pSymGetLineFromAddr64(hProcess, addr, &line_offset, &line);
+    have_source= SymGetLineFromAddr64(hProcess, addr, &line_offset, &line);
 
     fprintf(stderr, "%p    ", addr);
     if(have_module)
@@ -610,7 +563,7 @@ void my_write_core(int unused)
   MINIDUMP_EXCEPTION_INFORMATION info;
   HANDLE hFile;
 
-  if(!exception_ptrs || !init_dbghelp_functions() || !pMiniDumpWriteDump)
+  if(!exception_ptrs)
     return;
 
   info.ExceptionPointers= exception_ptrs;
@@ -628,7 +581,7 @@ void my_write_core(int unused)
   if(hFile)
   {
     /* Create minidump */
-    if(pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(),
+    if(MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(),
       hFile, MiniDumpNormal, &info, 0, 0))
     {
       fprintf(stderr, "Minidump written to %s\n",

=== modified file 'packaging/WiX/CPackWixConfig.cmake'
--- a/packaging/WiX/CPackWixConfig.cmake	2010-02-16 15:17:10 +0000
+++ b/packaging/WiX/CPackWixConfig.cmake	2010-06-30 12:10:29 +0000
@@ -7,7 +7,7 @@ IF(ESSENTIALS)
  SET(CPACK_PACKAGE_FILE_NAME  "mysql-essentials-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}-win${bits}")
 ELSE()
   SET(CPACK_COMPONENTS_USED 
-    "Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts")
+    "Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts;DebugBinaries")
 ENDIF()
 
 
@@ -45,6 +45,13 @@ SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DE
  SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs")
  SET(CPACK_COMPONENT_CLIENT_DESCRIPTION 
    "Various helpful (commandline) tools including the mysql command line client" )
+ # Subfeature "Debug binaries" 
+ SET(CPACK_COMPONENT_DEBUGBINARIES_GROUP "MySQLServer")
+ SET(CPACK_COMPONENT_DEBUGBINARIES_DISPLAY_NAME "Debug binaries")
+ SET(CPACK_COMPONENT_DEBUGBINARIES_DESCRIPTION 
+   "Debug/trace versions of executables and libraries" )
+ #SET(CPACK_COMPONENT_DEBUGBINARIES_WIX_LEVEL 2)
+  
    
  #Subfeature "Data Files" 
  SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer")

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-06-21 13:08:16 +0000
+++ b/sql/CMakeLists.txt	2010-06-30 12:10:29 +0000
@@ -156,7 +156,10 @@ IF(WITH_MYSQLD_LDFLAGS)
   SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS 
      "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}")
 ENDIF()
-INSTALL_DEBUG_TARGET(mysqld DESTINATION ${INSTALL_SBINDIR} RENAME mysqld-debug)
+INSTALL_DEBUG_TARGET(mysqld 
+  DESTINATION ${INSTALL_SBINDIR} 
+  PDB_DESTINATION ${INSTALL_SBINDIR}/debug
+  RENAME mysqld-debug)
 
 # Handle out-of-source build from source package with possibly broken 
 # bison. Copy bison output to from source to build directory, if not already 

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2010-06-06 11:19:29 +0000
+++ b/sql/log.cc	2010-06-30 19:32:05 +0000
@@ -209,7 +209,7 @@ class binlog_cache_data
 {
 public:
   binlog_cache_data(): m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF),
-  incident(FALSE)
+  incident(FALSE), changes_to_non_trans_temp_table_flag(FALSE)
   {
     cache_log.end_of_file= max_binlog_cache_size;
   }
@@ -245,9 +245,20 @@ public:
     return(incident);
   }
 
+  void set_changes_to_non_trans_temp_table()
+  {
+    changes_to_non_trans_temp_table_flag= TRUE;    
+  }
+
+  bool changes_to_non_trans_temp_table()
+  {
+    return (changes_to_non_trans_temp_table_flag);    
+  }
+
   void reset()
   {
     truncate(0);
+    changes_to_non_trans_temp_table_flag= FALSE;
     incident= FALSE;
     before_stmt_pos= MY_OFF_T_UNDEF;
     cache_log.end_of_file= max_binlog_cache_size;
@@ -305,6 +316,12 @@ private:
   bool incident;
 
   /*
+    This flag indicates if the cache has changes to temporary tables.
+    @TODO This a temporary fix and should be removed after BUG#54562.
+  */
+  bool changes_to_non_trans_temp_table_flag;
+
+  /*
     It truncates the cache to a certain position. This includes deleting the
     pending event.
    */
@@ -1772,13 +1789,23 @@ static int binlog_rollback(handlerton *h
     /*
       We flush the cache wrapped in a beging/rollback if:
         . aborting a single or multi-statement transaction and;
-        . the format is STMT and non-trans engines were updated or;
-        . the OPTION_KEEP_LOG is activate.
+        . the OPTION_KEEP_LOG is active or;
+        . the format is STMT and a non-trans table was updated or;
+        . the format is MIXED and a temporary non-trans table was
+          updated or;
+        . the format is MIXED, non-trans table was updated and
+          aborting a single statement transaction;
     */
+
     if (ending_trans(thd, all) &&
         ((thd->variables.option_bits & OPTION_KEEP_LOG) ||
          (trans_has_updated_non_trans_table(thd) &&
-          thd->variables.binlog_format == BINLOG_FORMAT_STMT)))
+          thd->variables.binlog_format == BINLOG_FORMAT_STMT) ||
+         (cache_mngr->trx_cache.changes_to_non_trans_temp_table() &&
+          thd->variables.binlog_format == BINLOG_FORMAT_MIXED) ||
+         (trans_has_updated_non_trans_table(thd) &&
+          ending_single_stmt_trans(thd,all) &&
+          thd->variables.binlog_format == BINLOG_FORMAT_MIXED)))
     {
       Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE, TRUE, 0);
       error= binlog_flush_trx_cache(thd, cache_mngr, &qev);
@@ -1786,13 +1813,18 @@ static int binlog_rollback(handlerton *h
     /*
       Truncate the cache if:
         . aborting a single or multi-statement transaction or;
-        . the OPTION_KEEP_LOG is not activate and;
-        . the format is not STMT or no non-trans were updated.
+        . the OPTION_KEEP_LOG is not active and;
+        . the format is not STMT or no non-trans table was
+          updated and;
+        . the format is not MIXED or no temporary non-trans table
+          was updated.
     */
     else if (ending_trans(thd, all) ||
              (!(thd->variables.option_bits & OPTION_KEEP_LOG) &&
-              ((!stmt_has_updated_non_trans_table(thd) ||
-               thd->variables.binlog_format != BINLOG_FORMAT_STMT))))
+              (!stmt_has_updated_non_trans_table(thd) ||
+               thd->variables.binlog_format != BINLOG_FORMAT_STMT) &&
+              (!cache_mngr->trx_cache.changes_to_non_trans_temp_table() ||
+               thd->variables.binlog_format != BINLOG_FORMAT_MIXED)))
       error= binlog_truncate_trx_cache(thd, cache_mngr, all);
   }
 
@@ -4254,7 +4286,23 @@ bool use_trans_cache(const THD* thd, boo
 */
 bool ending_trans(THD* thd, const bool all)
 {
-  return (all || (!all && !thd->in_multi_stmt_transaction_mode()));
+  return (all || ending_single_stmt_trans(thd, all));
+}
+
+/**
+  This function checks if a single statement transaction is about
+  to commit or not.
+
+  @param thd The client thread that executed the current statement.
+  @param all Committing a transaction (i.e. TRUE) or a statement
+             (i.e. FALSE).
+  @return
+    @c true if committing a single statement transaction, otherwise
+    @c false.
+*/
+bool ending_single_stmt_trans(THD* thd, const bool all)
+{
+  return (!all && !thd->in_multi_stmt_transaction_mode());
 }
 
 /**
@@ -4653,6 +4701,9 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
       file= cache_mngr->get_binlog_cache_log(is_trans_cache);
       cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache);
 
+      if (thd->stmt_accessed_non_trans_temp_table())
+        cache_data->set_changes_to_non_trans_temp_table();
+
       thd->binlog_start_trans_and_stmt();
     }
     DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));

=== modified file 'sql/log.h'
--- a/sql/log.h	2010-06-06 11:19:29 +0000
+++ b/sql/log.h	2010-06-30 15:25:13 +0000
@@ -27,6 +27,7 @@ bool trans_has_updated_trans_table(const
 bool stmt_has_updated_trans_table(const THD *thd);
 bool use_trans_cache(const THD* thd, bool is_transactional);
 bool ending_trans(THD* thd, const bool all);
+bool ending_single_stmt_trans(THD* thd, const bool all);
 bool trans_has_updated_non_trans_table(const THD* thd);
 bool stmt_has_updated_non_trans_table(const THD* thd);
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-06-11 13:48:24 +0000
+++ b/sql/log_event.cc	2010-06-30 15:25:13 +0000
@@ -678,8 +678,9 @@ Log_event::Log_event(THD* thd_arg, uint1
 {
   server_id=	thd->server_id;
   when=		thd->start_time;
-  cache_type= (using_trans || stmt_has_updated_trans_table(thd)
-               || thd->thread_temporary_used
+  cache_type= ((using_trans || stmt_has_updated_trans_table(thd) ||
+               (thd->stmt_accessed_temp_table() &&
+               trans_has_updated_trans_table(thd)))
                ? Log_event::EVENT_TRANSACTIONAL_CACHE :
                Log_event::EVENT_STMT_CACHE);
 }
@@ -2519,8 +2520,9 @@ Query_log_event::Query_log_event(THD* th
   }
   else
   {
-    cache_type= ((using_trans || stmt_has_updated_trans_table(thd)
-                  || trx_cache || thd->thread_temporary_used)
+    cache_type= ((using_trans || stmt_has_updated_trans_table(thd) || trx_cache ||
+                 (thd->stmt_accessed_temp_table() &&
+                 trans_has_updated_trans_table(thd)))
                  ? Log_event::EVENT_TRANSACTIONAL_CACHE :
                  Log_event::EVENT_STMT_CACHE);
   }

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2010-06-17 13:31:51 +0000
+++ b/sql/sql_class.cc	2010-06-30 15:25:13 +0000
@@ -493,7 +493,9 @@ THD::THD()
    rli_fake(0),
    lock_id(&main_lock_id),
    user_time(0), in_sub_stmt(0),
-   binlog_unsafe_warning_flags(0), binlog_table_maps(0),
+   binlog_unsafe_warning_flags(0),
+   stmt_accessed_table_flag(0),
+   binlog_table_maps(0),
    table_map_for_update(0),
    arg_of_last_insert_id_function(FALSE),
    first_successful_insert_id_in_prev_stmt(0),
@@ -537,7 +539,7 @@ THD::THD()
   count_cuted_fields= CHECK_FIELD_IGNORE;
   killed= NOT_KILLED;
   col_access=0;
-  is_slave_error= thread_specific_used= thread_temporary_used= FALSE;
+  is_slave_error= thread_specific_used= FALSE;
   my_hash_clear(&handler_tables_hash);
   tmp_table=0;
   used_tables=0;
@@ -3663,7 +3665,7 @@ int THD::decide_logging_format(TABLE_LIS
       capabilities.
     */
     handler::Table_flags flags_write_some_set= 0;
-    handler::Table_flags flags_some_set= 0;
+    handler::Table_flags flags_access_some_set= 0;
     handler::Table_flags flags_write_all_set=
       HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE;
 
@@ -3678,17 +3680,7 @@ int THD::decide_logging_format(TABLE_LIS
        Innodb and Falcon; Innodb and MyIsam.
     */
     my_bool multi_access_engine= FALSE;
-    /*
-       If non-transactional and transactional engines are about
-       to be accessed and any of them is about to be updated.
-       For example: Innodb and MyIsam.
-    */
-    my_bool trans_non_trans_access_engines= FALSE;
-    /*
-       If all engines that are about to be updated are
-       transactional.
-    */
-    my_bool all_trans_write_engines= TRUE;
+
     TABLE* prev_write_table= NULL;
     TABLE* prev_access_table= NULL;
 
@@ -3712,9 +3704,12 @@ int THD::decide_logging_format(TABLE_LIS
     {
       if (table->placeholder())
         continue;
+
       if (table->table->s->table_category == TABLE_CATEGORY_PERFORMANCE)
         lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_TABLE);
+
       handler::Table_flags const flags= table->table->file->ha_table_flags();
+
       DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx",
                           table->table_name, flags));
       if (table->lock_type >= TL_WRITE_ALLOW_WRITE)
@@ -3722,177 +3717,171 @@ int THD::decide_logging_format(TABLE_LIS
         if (prev_write_table && prev_write_table->file->ht !=
             table->table->file->ht)
           multi_write_engine= TRUE;
-        /*
-          Every temporary table must be always written to the binary
-          log in transaction boundaries and as such we artificially
-          classify them as transactional.
-
-          Indirectly, this avoids classifying a temporary table created
-          on a non-transactional engine as unsafe when it is modified
-          after any transactional table:
-
-          BEGIN;
-            INSERT INTO innodb_t VALUES (1);
-            INSERT INTO myisam_t_temp VALUES (1);
-          COMMIT;
-
-          BINARY LOG:
-
-          BEGIN;
-            INSERT INTO innodb_t VALUES (1);
-            INSERT INTO myisam_t_temp VALUES (1);
-          COMMIT;
-        */
-        all_trans_write_engines= all_trans_write_engines &&
-                                 (table->table->file->has_transactions() ||
-                                  table->table->s->tmp_table);
-        prev_write_table= table->table;
-        flags_write_all_set &= flags;
-        flags_write_some_set |= flags;
-      }
-      flags_some_set |= flags;
-      /*
-        The mixture of non-transactional and transactional tables must
-        identified and classified as unsafe. However, a temporary table
-        must be always handled as a transactional table. Based on that,
-        we have the following statements classified as mixed and by
-        consequence as unsafe:
 
-        1: INSERT INTO myisam_t SELECT * FROM innodb_t;
+        my_bool trans= table->table->file->has_transactions();
 
-        2: INSERT INTO innodb_t SELECT * FROM myisam_t;
-
-        3: INSERT INTO myisam_t SELECT * FROM myisam_t_temp;
-
-        4: INSERT INTO myisam_t_temp SELECT * FROM myisam_t;
-
-        5: CREATE TEMPORARY TABLE myisam_t_temp SELECT * FROM mysiam_t;
+        if (table->table->s->tmp_table)
+          set_stmt_accessed_table(trans ? STMT_WRITES_TEMP_TRANS_TABLE :
+                                          STMT_WRITES_TEMP_NON_TRANS_TABLE);
+        else
+          set_stmt_accessed_table(trans ? STMT_WRITES_TRANS_TABLE :
+                                          STMT_WRITES_NON_TRANS_TABLE);
 
-        The following statements are not considered mixed and as such
-        are safe:
+        flags_write_all_set &= flags;
+        flags_write_some_set |= flags;
 
-        1: INSERT INTO innodb_t SELECT * FROM myisam_t_temp;
+        prev_write_table= table->table;
+      }
+      flags_access_some_set |= flags;
 
-        2: INSERT INTO myisam_t_temp SELECT * FROM innodb_t_temp;
-      */
-      if (!trans_non_trans_access_engines && prev_access_table &&
-          (lex->sql_command != SQLCOM_CREATE_TABLE ||
+      if (lex->sql_command != SQLCOM_CREATE_TABLE ||
           (lex->sql_command == SQLCOM_CREATE_TABLE &&
-          (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))))
+          (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)))
       {
-        my_bool prev_trans;
-        my_bool act_trans;
-        if (prev_access_table->s->tmp_table || table->table->s->tmp_table)
-        {
-          prev_trans= prev_access_table->s->tmp_table ? TRUE :
-                     prev_access_table->file->has_transactions();
-          act_trans= table->table->s->tmp_table ? TRUE :
-                    table->table->file->has_transactions();
-        }
+        my_bool trans= table->table->file->has_transactions();
+
+        if (table->table->s->tmp_table)
+          set_stmt_accessed_table(trans ? STMT_READS_TEMP_TRANS_TABLE :
+                                          STMT_READS_TEMP_NON_TRANS_TABLE);
         else
-        {
-          prev_trans= prev_access_table->file->has_transactions();
-          act_trans= table->table->file->has_transactions();
-        }
-        trans_non_trans_access_engines= (prev_trans != act_trans);
-        multi_access_engine= TRUE;
+          set_stmt_accessed_table(trans ? STMT_READS_TRANS_TABLE :
+                                          STMT_READS_NON_TRANS_TABLE);
       }
-      thread_temporary_used |= table->table->s->tmp_table;
+
+      if (prev_access_table && prev_access_table->file->ht !=
+          table->table->file->ht)
+        multi_access_engine= TRUE;
+
       prev_access_table= table->table;
     }
 
     DBUG_PRINT("info", ("flags_write_all_set: 0x%llx", flags_write_all_set));
     DBUG_PRINT("info", ("flags_write_some_set: 0x%llx", flags_write_some_set));
-    DBUG_PRINT("info", ("flags_some_set: 0x%llx", flags_some_set));
+    DBUG_PRINT("info", ("flags_access_some_set: 0x%llx", flags_access_some_set));
     DBUG_PRINT("info", ("multi_write_engine: %d", multi_write_engine));
     DBUG_PRINT("info", ("multi_access_engine: %d", multi_access_engine));
-    DBUG_PRINT("info", ("trans_non_trans_access_engines: %d",
-                        trans_non_trans_access_engines));
 
     int error= 0;
     int unsafe_flags;
 
     /*
-      Set the statement as unsafe if:
-
-      . it is a mixed statement, i.e. access transactional and non-transactional
-      tables, and update any of them;
-
-      or:
-
-      . an early statement updated a transactional table;
-      . and, the current statement updates a non-transactional table.
-
-      Any mixed statement is classified as unsafe to ensure that mixed mode is
-      completely safe. Consider the following example to understand why we
-      decided to do this:
-
-      Note that mixed statements such as
-
-      1: INSERT INTO myisam_t SELECT * FROM innodb_t;
-
-      2: INSERT INTO innodb_t SELECT * FROM myisam_t;
-
-      3: INSERT INTO myisam_t SELECT * FROM myisam_t_temp;
-
-      4: INSERT INTO myisam_t_temp SELECT * FROM myisam_t;
-
-      5: CREATE TEMPORARY TABLE myisam_t_temp SELECT * FROM mysiam_t;
-
-      are classified as unsafe to ensure that in mixed mode the execution is
-      completely safe and equivalent to the row mode. Consider the following
-      statements and sessions (connections) to understand the reason:
-
-      con1: INSERT INTO innodb_t VALUES (1);
-      con1: INSERT INTO innodb_t VALUES (100);
+      Classify a statement as unsafe when there is a mixed statement and an
+      on-going transaction at any point of the execution if:
 
-      con1: BEGIN
-      con2: INSERT INTO myisam_t SELECT * FROM innodb_t;
-      con1: INSERT INTO innodb_t VALUES (200);
-      con1: COMMIT;
+        1. The mixed statement is about to update a transactional table and
+        a non-transactional table.
 
-      The point is that the concurrent statements may be written into the binary log
-      in a way different from the execution. For example,
-
-      BINARY LOG:
-
-      con2: BEGIN;
-      con2: INSERT INTO myisam_t SELECT * FROM innodb_t;
-      con2: COMMIT;
-      con1: BEGIN
-      con1: INSERT INTO innodb_t VALUES (200);
-      con1: COMMIT;
-
-      ....
-
-      or
-
-      BINARY LOG:
-
-      con1: BEGIN
-      con1: INSERT INTO innodb_t VALUES (200);
-      con1: COMMIT;
-      con2: BEGIN;
-      con2: INSERT INTO myisam_t SELECT * FROM innodb_t;
-      con2: COMMIT;
-
-      Clearly, this may become a problem in STMT mode and setting the statement
-      as unsafe will make rows to be written into the binary log in MIXED mode
-      and as such the problem will not stand.
+        2. The mixed statement is about to update a temporary transactional
+        table and a non-transactional table.
+      
+        3. The mixed statement is about to update a transactional table and
+        read from a non-transactional table.
+
+        4. The mixed statement is about to update a temporary transactional
+        table and read from a non-transactional table.
+
+        5. The mixed statement is about to update a non-transactional table
+        and read from a transactional table when the isolation level is
+        lower than repeatable read.
+
+      After updating a transactional table if:
+
+        6. The mixed statement is about to update a non-transactional table
+        and read from a temporary transactional table.
+ 
+        7. The mixed statement is about to update a non-transactional table
+        and read from a temporary transactional table.
+
+        8. The mixed statement is about to update a non-transactionala table
+        and read from a temporary non-transactional table.
+     
+        9. The mixed statement is about to update a temporary non-transactional
+        table and update a non-transactional table.
+     
+        10. The mixed statement is about to update a temporary non-transactional
+        table and read from a non-transactional table.
+     
+        11. A statement is about to update a non-transactional table and the
+        option variables.binlog_direct_non_trans_update is OFF.
+
+      The reason for this is that locks acquired may not protected a concurrent
+      transaction of interfering in the current execution and by consequence in
+      the result. In particular, if there is an on-going transaction and a
+      transactional table was already updated, a temporary table must be written
+      to the binary log in the boundaries of the on-going transaction and as
+      such we artificially classify them as transactional.
+    */
+    if (in_multi_stmt_transaction_mode())
+    {
+      my_bool mixed_unsafe= FALSE;
+      my_bool non_trans_unsafe= FALSE;
 
-      In STMT mode, although such statement is classified as unsafe, i.e.
+      /* Case 1. */
+      if (stmt_accessed_table(STMT_WRITES_TRANS_TABLE) &&
+          stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE))
+        mixed_unsafe= TRUE;
+      /* Case 2. */
+      else if (stmt_accessed_table(STMT_WRITES_TEMP_TRANS_TABLE) &&
+               stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE))
+        mixed_unsafe= TRUE;
+      /* Case 3. */
+      else if (stmt_accessed_table(STMT_WRITES_TRANS_TABLE) &&
+               stmt_accessed_table(STMT_READS_NON_TRANS_TABLE))
+        mixed_unsafe= TRUE;
+      /* Case 4. */
+      else if (stmt_accessed_table(STMT_WRITES_TEMP_TRANS_TABLE) &&
+               stmt_accessed_table(STMT_READS_NON_TRANS_TABLE))
+        mixed_unsafe= TRUE;
+      /* Case 5. */
+      else if (stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE) &&
+               stmt_accessed_table(STMT_READS_TRANS_TABLE) &&
+               tx_isolation < ISO_REPEATABLE_READ)
+        /*
+           By default, InnoDB operates in REPEATABLE READ and with the option
+           --innodb-locks-unsafe-for-binlog disabled. In this case, InnoDB uses
+           next-key locks for searches and index scans, which prevents phantom
+           rows.
+ 
+           This is scenario is safe for Innodb. However, there are no means to
+           transparently get this information. Therefore, we need to improve this
+           and change the storage engines to report somehow when an execution is
+           safe under an isolation level & binary logging format.
+        */
+        mixed_unsafe= TRUE;
 
-      INSERT INTO myisam_t SELECT * FROM innodb_t;
+      if (trans_has_updated_trans_table(this))
+      {
+        /* Case 6. */
+        if (stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE) &&
+            stmt_accessed_table(STMT_READS_TRANS_TABLE))
+          mixed_unsafe= TRUE;
+        /* Case 7. */
+        else if (stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE) &&
+                 stmt_accessed_table(STMT_READS_TEMP_TRANS_TABLE))
+          mixed_unsafe= TRUE;
+        /* Case 8. */
+        else if (stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE) &&
+                 stmt_accessed_table(STMT_READS_TEMP_NON_TRANS_TABLE))
+          mixed_unsafe= TRUE;
+        /* Case 9. */
+        else if (stmt_accessed_table(STMT_WRITES_TEMP_NON_TRANS_TABLE) &&
+                 stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE))
+          mixed_unsafe= TRUE;
+        /* Case 10. */
+        else if (stmt_accessed_table(STMT_WRITES_TEMP_NON_TRANS_TABLE) &&
+                 stmt_accessed_table(STMT_READS_NON_TRANS_TABLE))
+        mixed_unsafe= TRUE;
+        /* Case 11. */
+        else if (!variables.binlog_direct_non_trans_update &&
+                 stmt_accessed_table(STMT_WRITES_NON_TRANS_TABLE))
+          non_trans_unsafe= TRUE;
+      }
 
-      there is no enough information to avoid writing it outside the boundaries
-      of a transaction. This is not a problem if we are considering snapshot
-      isolation level but if we have pure repeatable read or serializable the
-      lock history on the slave will be different from the master.
-    */
-    if (trans_non_trans_access_engines)
-      lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MIXED_STATEMENT);
-    else if (trans_has_updated_trans_table(this) && !all_trans_write_engines)
-      lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS);
+      if (mixed_unsafe)
+        lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MIXED_STATEMENT);
+      else if (non_trans_unsafe)
+        lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS);
+    }
 
     /*
       If more than one engine is involved in the statement and at
@@ -3904,7 +3893,7 @@ int THD::decide_logging_format(TABLE_LIS
         (flags_write_some_set & HA_HAS_OWN_BINLOGGING))
       my_error((error= ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE),
                MYF(0));
-    else if (multi_access_engine && flags_some_set & HA_HAS_OWN_BINLOGGING)
+    else if (multi_access_engine && flags_access_some_set & HA_HAS_OWN_BINLOGGING)
       lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE);
 
     /* both statement-only and row-only engines involved */

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2010-06-17 13:31:51 +0000
+++ b/sql/sql_class.h	2010-06-30 15:25:13 +0000
@@ -1566,6 +1566,125 @@ public:
     return current_stmt_binlog_format == BINLOG_FORMAT_ROW;
   }
 
+  enum enum_stmt_accessed_table
+  {
+    /*
+       If a transactional table is about to be read. Note that
+       a write implies a read.
+    */
+    STMT_READS_TRANS_TABLE= 0,
+    /*
+       If a transactional table is about to be updated.
+    */
+    STMT_WRITES_TRANS_TABLE,
+    /*
+       If a non-transactional table is about to be read. Note that
+       a write implies a read.
+    */
+    STMT_READS_NON_TRANS_TABLE,
+    /*
+       If a non-transactional table is about to be updated.
+    */
+    STMT_WRITES_NON_TRANS_TABLE,
+    /*
+       If a temporary transactional table is about to be read. Note
+       that a write implies a read.
+    */
+    STMT_READS_TEMP_TRANS_TABLE,
+    /*
+       If a temporary transactional table is about to be updated.
+    */
+    STMT_WRITES_TEMP_TRANS_TABLE,
+    /*
+       If a temporary non-transactional table is about to be read. Note
+      that a write implies a read.
+    */
+    STMT_READS_TEMP_NON_TRANS_TABLE,
+    /*
+       If a temporary non-transactional table is about to be updated.
+    */
+    STMT_WRITES_TEMP_NON_TRANS_TABLE,
+    /*
+      The last element of the enumeration. Please, if necessary add
+      anything before this.
+    */
+    STMT_ACCESS_TABLE_COUNT
+  };
+
+  /**
+    Sets the type of table that is about to be accessed while executing a
+    statement.
+
+    @param accessed_table Enumeration type that defines the type of table,
+                           e.g. temporary, transactional, non-transactional.
+  */
+  inline void set_stmt_accessed_table(enum_stmt_accessed_table accessed_table)
+  {
+    DBUG_ENTER("THD::set_stmt_accessed_table");
+
+    DBUG_ASSERT(accessed_table >= 0 && accessed_table < STMT_ACCESS_TABLE_COUNT);
+    stmt_accessed_table_flag |= (1U << accessed_table);
+
+    DBUG_VOID_RETURN;
+  }
+
+  /**
+    Checks if a type of table is about to be accessed while executing a
+    statement.
+
+    @param accessed_table Enumeration type that defines the type of table,
+                           e.g. temporary, transactional, non-transactional.
+
+    @return
+      @retval TRUE  if the type of the table is about to be accessed
+      @retval FALSE otherwise
+  */
+  inline bool stmt_accessed_table(enum_stmt_accessed_table accessed_table)
+  {
+    DBUG_ENTER("THD::stmt_accessed_table");
+
+    DBUG_ASSERT(accessed_table >= 0 && accessed_table < STMT_ACCESS_TABLE_COUNT);
+
+    DBUG_RETURN((stmt_accessed_table_flag & (1U << accessed_table)) != 0);
+  }
+
+  /**
+    Checks if a temporary table is about to be accessed while executing a
+    statement.
+
+    @return
+      @retval TRUE  if a temporary table is about to be accessed
+      @retval FALSE otherwise
+  */
+  inline bool stmt_accessed_temp_table()
+  {
+    DBUG_ENTER("THD::stmt_accessed_temp_table");
+
+    DBUG_RETURN((stmt_accessed_table_flag &
+                ((1U << STMT_READS_TEMP_TRANS_TABLE) |
+                 (1U << STMT_WRITES_TEMP_TRANS_TABLE) |
+                 (1U << STMT_READS_TEMP_NON_TRANS_TABLE) |
+                 (1U << STMT_WRITES_TEMP_NON_TRANS_TABLE))) != 0);
+  }
+
+  /**
+    Checks if a temporary non-transactional table is about to be accessed
+    while executing a statement.
+
+    @return
+      @retval TRUE  if a temporary non-transactional table is about to be
+                    accessed
+      @retval FALSE otherwise
+  */
+  inline bool stmt_accessed_non_trans_temp_table()
+  {
+    DBUG_ENTER("THD::stmt_accessed_non_trans_temp_table");
+
+    DBUG_RETURN((stmt_accessed_table_flag &
+                ((1U << STMT_READS_TEMP_NON_TRANS_TABLE) |
+                 (1U << STMT_WRITES_TEMP_NON_TRANS_TABLE))) != 0);
+  }
+
 private:
   /**
     Indicates the format in which the current statement will be
@@ -1603,6 +1722,12 @@ private:
   */
   uint32 binlog_unsafe_warning_flags;
 
+  /**
+    Bit field that determines the type of tables that are about to be
+    be accessed while executing a statement.
+  */
+  uint32 stmt_accessed_table_flag;
+
   void issue_unsafe_warnings();
 
   /*
@@ -2021,7 +2146,6 @@ public:
     is set if a statement accesses a temporary table created through
     CREATE TEMPORARY TABLE. 
   */
-  bool       thread_temporary_used;
   bool	     charset_is_system_charset, charset_is_collation_connection;
   bool       charset_is_character_set_filesystem;
   bool       enable_slow_log;   /* enable slow log for current statement */

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-07-01 13:53:46 +0000
+++ b/sql/sql_parse.cc	2010-07-06 09:17:28 +0000
@@ -5608,7 +5608,7 @@ void THD::reset_for_next_command()
     thd->transaction.all.modified_non_trans_table= FALSE;
   }
   DBUG_ASSERT(thd->security_ctx== &thd->main_security_ctx);
-  thd->thread_specific_used= thd->thread_temporary_used= FALSE;
+  thd->thread_specific_used= FALSE;
 
   if (opt_bin_log)
   {
@@ -5623,6 +5623,7 @@ void THD::reset_for_next_command()
 
   thd->reset_current_stmt_binlog_format_row();
   thd->binlog_unsafe_warning_flags= 0;
+  thd->stmt_accessed_table_flag= 0;
 
   DBUG_PRINT("debug",
              ("is_current_stmt_binlog_format_row(): %d",

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-06-17 13:31:51 +0000
+++ b/sql/sys_vars.cc	2010-07-05 09:17:01 +0000
@@ -875,7 +875,7 @@ static Sys_var_uint Sys_large_page_size(
 
 static Sys_var_mybool Sys_large_pages(
        "large_pages", "Enable support for large pages",
-       READ_ONLY GLOBAL_VAR(opt_large_files),
+       READ_ONLY GLOBAL_VAR(opt_large_pages),
        IF_WIN(NO_CMD_LINE, CMD_LINE(OPT_ARG)), DEFAULT(FALSE));
 
 static Sys_var_charptr Sys_language(

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2010-04-19 12:09:44 +0000
+++ b/storage/myisam/ha_myisam.cc	2010-07-02 10:56:54 +0000
@@ -2069,7 +2069,7 @@ mysql_declare_plugin(myisam)
   &myisam_storage_engine,
   "MyISAM",
   "MySQL AB",
-  "Default engine as of MySQL 3.23 with great performance",
+  "MyISAM storage engine",
   PLUGIN_LICENSE_GPL,
   myisam_init, /* Plugin Init */
   NULL, /* Plugin Deinit */


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20100706091728-8ltwf4p9u6xc93tz.bundle
Thread
bzr commit into mysql-trunk-runtime branch (jon.hauglid:3077) Jon Olav Hauglid6 Jul