List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:December 7 2010 2:11pm
Subject:Re: bzr commit into mysql-trunk branch (Li-Bing.Song:3350) Bug#55798
Bug#56184
View as plain text  
Hi Libing,

Really great work.

STATUS
------

Not approved.

REQUIRED
--------

1 - Can you create a new patch based on the latest branch?

2 - I think it is all instead of stmt:

@@ -1663,7 +1661,7 @@ multi_update::~multi_update()
      delete [] copy_field;
    thd->count_cuted_fields= CHECK_FIELD_IGNORE;		// Restore this setting
    DBUG_ASSERT(trans_safe || !updated ||
-              thd->transaction.all.modified_non_trans_table);
+              thd->transaction.stmt.cannot_safe_rollback());
  }


3 - Can you check if a failing statement that update a non-transactional 
engine is correctly logged? Two cases with
multi-row insert: (1) fails before inserting anything, (2) fails after
inserting at least a row.

@@ -850,9 +850,6 @@ int mysql_update(THD *thd,
      query_cache_invalidate3(thd, table_list, 1);
    }

-  if (thd->transaction.stmt.modified_non_trans_table)
-      thd->transaction.all.modified_non_trans_table= TRUE;


4 - Wouldn't be better s/cannot_safe_rollback/cannot_safely_rollback/ ?


REQUESTS
--------


1 - Why don't you use thd->transaction.stmt.created_temp_table();
at the points where OPTION_KEEP_LOG was set? For example,

      }
      else
      {
-      /* So that CREATE TEMPORARY TABLE gets to binlog at 
commit/rollback */
-      if (create_info.options & HA_LEX_CREATE_TMP_TABLE)
-        thd->variables.option_bits|= OPTION_KEEP_LOG;
        /* regular create */
        if (create_info.options & HA_LEX_CREATE_TABLE_LIKE)
        {



2 - I cannot understand why a copy at this point of the code.
What does it happen if the statement fails and still a non-transactional
table is updated? Can you write a comment on this? See Item 3, above.

@@ -4378,6 +4366,8 @@ finish:
    DBUG_ASSERT(!thd->in_active_multi_stmt_transaction() ||
                 thd->in_multi_stmt_transaction_mode());

+  THD::st_transactions &trans= thd->transaction;
+ 
trans.all.add_unsafe_rollback_flags(trans.stmt.get_unsafe_rollback_flags());

    if (! thd->in_sub_stmt)
    {


Cheers.

On 12/04/2010 11:16 AM, Li-Bing.Song@stripped wrote:
> #At file:///home/anders/Work/bzrwork/wt3/mysql-trunk-bugfixing/ based on
> revid:dao-gang.qu@stripped
>
>   3350 Li-Bing.Song@stripped	2010-12-04
>        Bug#56184 Rolled back transaction without non-trasactional table updated was
> binlogged
>        Bug#55798 Slave SQL retry on transaction inserts extra data into
> non-transaction table
>
>        Bug#56184
>        The transaction modified non-transactional table will be binlogged with
> ROLLBACK if it
>        rolls back on master. It includes the case that all statements which modified
>        non-transactional table are binlogged outside(before) the transaction.
>        Example:
>          BEGIN
>          INSERT INTO trans-table;
>          INSERT INOT non-trans-table;
>          ROLLBACK
>        it will be binlogged as:
>          BEGIN
>          INSERT INTO non-trans-table;
>          COMMIT
>          BEGIN
>          INSERT INTO trans-table;
>          ROLLBACK;
>        All statements in the second binlogged transaction modify only transactional
> tables and
>        are rolled back safely on master. So the second transaction should not be
> binlogged.
>
>        After 5.5, there are two caches for binary logs, a transactional cache
>        and a statement cache. When executing a transaction, statements that
>        modified only transactional tables are always put in transactional
>        cache. Statements that modified non-transactional tables can be put in
>        either transactional or non-transactional cache depending on different
>        situations. In this patch, a flag is added to mark if there is any
>        statement that modified non-transactional table in transactional cache.
>        When rolling back a transaction on master, transactional cache should
>        not be flushed to binary log, if there is no statement in it that
>        modified a non-transactional table. Otherwise, it should be flushed into
>        binary log followed by 'ROLLBACK' statement.
>
>        BUG#55798
>        When a temporary error(eg. Lock timeout) happens, Slave SQL thread will
> rollback the
>        transaction and retry it again. But it is possible that the transaction cannot
> be
>        rolled back safely. For example a non-transactional table has been modified by
> the
>        transaction. It will make master and slave diversely.
>
>        After this patch, SQL thread will not retry to execute a transaction which can
> not be rolled
>        back safely if temporary error is encountered.
>       @ mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
>          Add test to verify this patch.
>       @ sql/binlog.cc
>          Refactor reset_cache, it is divided into reset_trx_cache() and
> reset_stmt_cache().
>          Add code to fix this bug.
>       @ sql/binlog.h
>          Removed trans_has_updated_non_trans_table() and
> stmt_has_updated_non_trans_table().
>          Added stmt_cannot_safe_rollback();
>          See also handler.h.
>       @ sql/ha_ndbcluster.cc
>          Refactoring modified_non_trans_table.
>       @ sql/ha_ndbcluster_binlog.cc
>          Refactoring modified_non_trans_table.
>       @ sql/handler.cc
>          Refactoring modified_non_trans_table.
>          Call push_unsafe_rollback_warnings() to print detail unsafe rollback
> warnings.
>       @ sql/handler.h
>          Use unsafe_rollback_flags to replace modified_non_trans_table.
>          At present, not only change of non-transactional table but also
>          creation and drop of temporary table cannot be rolled back.
>          So unsafe_rollback_flags is a suitable name to express the meaning
>          and can store more detail information, as it was defined as a set of
>          flags.
>       @ sql/log_event.cc
>          Refactoring modified_non_trans_table.
>       @ sql/rpl_slave.cc
>          OPTION_KEEP_LOG is replaced by stmt.cannot_safe_rollback().
>          Remove OPTION_KEEP_LOG from all code.
>       @ sql/share/errmsg-utf8.txt
>          Added two warnings.
>       @ sql/sp_head.cc
>          Refactoring modified_non_trans_table.
>       @ sql/sql_class.cc
>          Refactoring modified_non_trans_table.
>       @ sql/sql_class.h
>          Refactoring modified_non_trans_table.
>          Added THD::st_transactions::push_unsafe_rollback_warnings
>          to print detail unsafe rollback information.
>       @ sql/sql_delete.cc
>          Refactoring modified_non_trans_table.
>          Removed the code to set thd->transaction.all.modified_non_trans_table,
>          it will be set in the end of mysql_execute_command().
>       @ sql/sql_insert.cc
>          Refactoring modified_non_trans_table.
>          Removed the code to set thd->transaction.all.modified_non_trans_table,
>          it will be set in the end of mysql_execute_command().
>       @ sql/sql_lex.h
>          Removed stmt_accessed_non_trans_temp_table();
>          It is useless after this patch.
>       @ sql/sql_load.cc
>          Refactoring modified_non_trans_table.
>       @ sql/sql_parse.cc
>          OPTION_KEEP_LOG is replaced by stmt.cannot_safe_rollback().
>          Remove OPTION_KEEP_LOG from all code.
>       @ sql/sql_priv.h
>          Removed OPTION_KEEP_LOG.
>       @ sql/sql_table.cc
>          Call stmt.created_temp_table() after a temporary table has been created.
>          Call stmt.dropped_temp_table() after a temporary table has been dropped.
>       @ sql/sql_truncate.cc
>          Refactoring modified_non_trans_table.
>       @ sql/sql_update.cc
>          Refactoring modified_non_trans_table.
>          Removed the code to set thd->transaction.all.modified_non_trans_table,
>          it will be set in the end of mysql_execute_command().
>       @ sql/sys_vars.cc
>          OPTION_KEEP_LOG is replaced by stmt.unsafe_rollback_flags.
>          Remove OPTION_KEEP_LOG from all code.
>       @ sql/transaction.cc
>          OPTION_KEEP_LOG is replaced by stmt.unsafe_rollback_flags.
>          Remove OPTION_KEEP_LOG from all code.
>
>      modified:
>        mysql-test/r/read_only_innodb.result
>        mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
>        mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
>        mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result
>        mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.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_row_mixing_engines.result
>        mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result
>        mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
>        mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
>        mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
>        mysql-test/suite/rpl/r/rpl_stm_innodb.result
>        mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
>        mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test
>        sql/binlog.cc
>        sql/binlog.h
>        sql/ha_ndbcluster.cc
>        sql/ha_ndbcluster_binlog.cc
>        sql/handler.cc
>        sql/handler.h
>        sql/log_event.cc
>        sql/rpl_slave.cc
>        sql/share/errmsg-utf8.txt
>        sql/sp_head.cc
>        sql/sql_class.cc
>        sql/sql_class.h
>        sql/sql_delete.cc
>        sql/sql_insert.cc
>        sql/sql_lex.h
>        sql/sql_load.cc
>        sql/sql_parse.cc
>        sql/sql_priv.h
>        sql/sql_table.cc
>        sql/sql_truncate.cc
>        sql/sql_update.cc
>        sql/sys_vars.cc
>        sql/transaction.cc
> === modified file 'mysql-test/r/read_only_innodb.result'
> --- a/mysql-test/r/read_only_innodb.result	2010-03-10 13:36:40 +0000
> +++ b/mysql-test/r/read_only_innodb.result	2010-12-04 11:15:37 +0000
> @@ -96,6 +96,8 @@ SELECT * FROM t2;
>   a
>   2
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   SELECT * FROM temp;
>   a
>   DROP TABLE temp;
>
> === modified file 'mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result'
> --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2010-10-26
> 09:10:59 +0000
> +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result	2010-12-04
> 11:15:37 +0000
> @@ -54,9 +54,6 @@ master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
>   master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
>   master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
> -master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   delete from t1;
>   delete from t2;
> @@ -87,9 +84,6 @@ master-bin.000001	#	Write_rows	#	#	table
>   master-bin.000001	#	Query	#	#	SAVEPOINT `my_savepoint`
>   master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
>   master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `my_savepoint`
> -master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   delete from t1;
>   delete from t2;
> @@ -249,6 +243,8 @@ commit;
>   begin;
>   create temporary table ti (a int) engine=innodb;
>   rollback;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   insert into ti values(1);
>   set autocommit=0;
>   create temporary table t1 (a int) engine=myisam;
> @@ -341,6 +337,7 @@ INSERT INTO t1 values (7,7);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   INSERT INTO t1 values (8,8);
>   CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select *
> from t1;
>   Warnings:
>
> === 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-10-26
> 09:10:59 +0000
> +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result	2010-12-04
> 11:15:37 +0000
> @@ -233,6 +233,8 @@ commit;
>   begin;
>   create temporary table ti (a int) engine=innodb;
>   rollback;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   insert into ti values(1);
>   set autocommit=0;
>   create temporary table t1 (a int) engine=myisam;
> @@ -337,6 +339,7 @@ Note	1592	Unsafe statement written to th
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   INSERT INTO t1 values (8,8);
>   CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select *
> from t1;
>   Warnings:
>
> === modified file 'mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result'
> --- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2010-09-27 13:20:24
> +0000
> +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result	2010-12-04 11:15:37
> +0000
> @@ -173,6 +173,43 @@ in savepoint mixed_cases
>   # Verify INSERT statements on the Innodb table are rolled back;
>   SELECT * FROM db1.t1 WHERE a IN (30, 40);
>   a
> +
> +# BUG#55798 Slave SQL retry on transaction inserts extra data into
> +# non-transaction table
> +# ----------------------------------------------------------------
> +# To verify that SQL thread does not retry a transaction which can
> +# not be rolled back safely, even though only a temporary error is
> +# encountered.
> +
> +# [ on master ]
> +USE db1;
> +DROP TABLE t1, t2;
> +CREATE TABLE t1(c1 INT KEY) ENGINE=MyISAM;
> +CREATE TABLE t2(c1 INT KEY) ENGINE=InnoDB;
> +INSERT INTO t2 VALUES(1);
> +# [ on slave ]
> +USE db1;
> +SET GLOBAL innodb_lock_wait_timeout= 1;
> +STOP SLAVE SQL_THREAD;
> +START SLAVE SQL_THREAD;
> +BEGIN;
> +# It will lock table t2 on row in which c1 is 1 until COMMIT or ROLLBACK
> +UPDATE t2 SET c1=10 WHERE c1=1;
> +# [ on master ]
> +SET @@session.binlog_direct_non_transactional_updates= FALSE;
> +BEGIN;
> +INSERT INTO t2 VALUES(3);
> +INSERT INTO t1 VALUES(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.
> +UPDATE t2 SET c1=11 WHERE c1=1;
> +COMMIT;
> +# [ on slave ]
> +Comparing tables master:db1.t1 and slave:db1.t1
> +ROLLBACK;
> +DELETE FROM t1 WHERE c1=4;
> +SET GLOBAL innodb_lock_wait_timeout= 50;
> +START SLAVE SQL_THREAD;
>   #
>   # Clean up
>   #
>
> === modified 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	2010-08-30
> 06:38:09 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result	2010-12-04
> 11:15:37 +0000
> @@ -559,6 +559,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -576,6 +578,7 @@ DROP TEMPORARY TABLE tt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -593,14 +596,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -612,6 +614,7 @@ DROP TEMPORARY TABLE nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -623,9 +626,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /*
> generated by server */
>   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-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';
> @@ -636,9 +636,6 @@ ERROR 42S02: Unknown table 'test.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';
> @@ -657,9 +654,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   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';
> @@ -671,10 +665,6 @@ Note	1051	Unknown table 'test.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`
> /* generated by server */
> -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';
> @@ -695,11 +685,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   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`
> /* generated by server */
> -master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_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-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';
> @@ -708,6 +693,8 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -727,6 +714,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -746,6 +734,8 @@ DROP TEMPORARY TABLE IF EXISTS tt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -767,6 +757,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -785,14 +776,13 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -806,6 +796,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -817,9 +808,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /*
> generated by server */
>   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-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';
> @@ -829,6 +817,8 @@ DROP TEMPORARY TABLE IF EXISTS nt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -853,6 +843,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -876,6 +867,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -896,6 +889,7 @@ DROP TEMPORARY TABLE tt_tmp_1, nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -919,6 +913,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -935,6 +931,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -951,14 +948,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE
> `nt_tmp_1`,`nt_tmp_2` /* generated by server */
>   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-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';
> @@ -969,6 +965,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -977,9 +974,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   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-NN-Temp N Drop-Temp-NN-Temp
> R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   #########################################################################
> @@ -1355,6 +1349,9 @@ CREATE TEMPORARY TABLE nt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE nt_tmp_1;
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -1369,9 +1366,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -1381,6 +1375,9 @@ CREATE TEMPORARY TABLE tt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE tt_tmp_1;
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
>
> === modified file 'mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result'
> --- a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result	2010-10-26 09:10:59
> +0000
> +++ b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result	2010-12-04 11:15:37
> +0000
> @@ -10264,8 +10264,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10276,8 +10274,6 @@ 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 (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10316,8 +10312,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (319, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T N Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10328,8 +10322,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T N Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10368,8 +10360,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (320, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn N T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10380,8 +10370,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn N T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -11294,6 +11282,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (351, 2)
> @@ -11341,11 +11331,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (353, 2)
> @@ -11394,6 +11386,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (355, 2)
> @@ -11443,6 +11437,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_14 (a int)
> engine=Innodb
> @@ -11484,6 +11479,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_15 (a int)
> engine=Innodb
> @@ -11531,6 +11528,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_16 (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-10-26
> 09:10:59 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result	2010-12-04
> 11:15:37 +0000
> @@ -10632,8 +10632,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10644,8 +10642,6 @@ 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 (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10685,8 +10681,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (319, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T N Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10698,8 +10692,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T N Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10739,8 +10731,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (320, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn N T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10752,8 +10742,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn N T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -11666,6 +11654,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (351, 2)
> @@ -11713,11 +11703,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (353, 2)
> @@ -11766,6 +11758,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (355, 2)
> @@ -11815,6 +11809,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_14 (a int)
> engine=Innodb
> @@ -11856,6 +11851,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_15 (a int)
> engine=Innodb
> @@ -11903,6 +11900,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_16 (a int)
> engine=Innodb
>
> === modified file 'mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result'
> --- a/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result	2010-10-26
> 09:10:59 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result	2010-12-04
> 11:15:37 +0000
> @@ -12244,9 +12244,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12259,9 +12256,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -12302,9 +12296,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T N Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12317,9 +12308,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T N Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -12360,9 +12348,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn N T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12375,9 +12360,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn N T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -13526,18 +13508,12 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T CT 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_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 CT R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13573,31 +13549,17 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn T CT Rn 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_1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn T CT Rn R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13628,22 +13590,12 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	Table_map	#	#	table_id: # (test.tt_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->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T 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.tt_1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13680,11 +13632,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -13692,10 +13641,6 @@ 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	#	#	COMMIT
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B tN CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13722,18 +13667,12 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B 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.tt_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 CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13770,11 +13709,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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
> @@ -13782,10 +13718,6 @@ 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	#	#	COMMIT
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
>
> === 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-10-26
> 09:10:59 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result	2010-12-04
> 11:15:37 +0000
> @@ -5512,18 +5512,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (189, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (189, 2)
>   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
> (189, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5546,20 +5540,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (190, 2)
>   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',190),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-proc R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5582,18 +5568,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (191, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (191, 2)
>   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
> (191, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-trig R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5618,18 +5598,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(192,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (192, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(192,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-func R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5652,18 +5626,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (193, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (193, 2)
>   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
> (193, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5686,18 +5654,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (194, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (194, 2)
>   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
> (194, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-trig R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5722,18 +5684,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(195,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (195, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(195,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-func R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5756,20 +5712,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (196, 2)
>   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',196),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-proc R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5794,18 +5742,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (197, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(197,2)
>   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
> (197, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5830,18 +5772,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (198, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(198,2)
>   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
> (198, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-trig R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5868,18 +5804,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(199,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(199,2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(199,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-func R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5904,20 +5834,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(200,2)
>   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',200),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-proc R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5945,9 +5867,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (201, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -5957,9 +5876,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (201, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5987,10 +5903,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6000,10 +5912,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -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',202),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6031,9 +5939,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (203, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6043,9 +5948,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> (203, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6075,9 +5977,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(204,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6087,9 +5986,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(204,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>
> @@ -6563,18 +6459,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (219, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info)
> SELECT 219, 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
> (219, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6823,18 +6713,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (227, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (227, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -9363,18 +9247,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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 304, 4, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N nT 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_1(trans_id, stmt_id)
> VALUES (304, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info)
> SELECT 304, 4, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N nT R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -9882,8 +9760,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -9894,8 +9770,6 @@ 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 (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10856,6 +10730,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (351, 2)
> @@ -10903,11 +10779,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (353, 2)
> @@ -10956,6 +10834,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (355, 2)
> @@ -11005,6 +10885,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_14 (a int)
> engine=Innodb
> @@ -11046,6 +10927,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_15 (a int)
> engine=Innodb
> @@ -11093,6 +10976,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_16 (a int)
> engine=Innodb
>
> === modified 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	2010-08-30
> 06:38:09 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result	2010-12-04
> 11:15:37 +0000
> @@ -592,6 +592,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -610,6 +612,7 @@ DROP TEMPORARY TABLE tt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -629,15 +632,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2`
> /* generated by server */
>   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-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';
> @@ -649,6 +650,7 @@ DROP TEMPORARY TABLE nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -661,10 +663,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`
> /* generated by server */
>   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-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';
> @@ -675,10 +673,6 @@ ERROR 42S02: Unknown table 'test.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';
> @@ -698,10 +692,6 @@ 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';
> @@ -713,11 +703,6 @@ Note	1051	Unknown table 'test.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	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_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-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';
> @@ -739,12 +724,6 @@ 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_xx_1`
> /* generated by server */
> -master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_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-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';
> @@ -753,6 +732,8 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -773,6 +754,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -794,6 +776,8 @@ DROP TEMPORARY TABLE IF EXISTS tt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -816,6 +800,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -836,15 +821,13 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2`
> /* generated by server */
>   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-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';
> @@ -858,6 +841,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -870,10 +854,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_1`
> /* generated by server */
>   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-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';
> @@ -883,6 +863,8 @@ DROP TEMPORARY TABLE IF EXISTS nt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -908,6 +890,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -933,6 +916,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -954,6 +939,7 @@ DROP TEMPORARY TABLE tt_tmp_1, nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -979,6 +965,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -996,6 +984,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -1014,15 +1003,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE IF EXISTS
> `nt_tmp_1`,`nt_tmp_2` /* generated by server */
>   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-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';
> @@ -1033,6 +1020,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -1042,10 +1030,6 @@ 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-NN-Temp N Drop-Temp-NN-Temp
> R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   #########################################################################
> @@ -1429,6 +1413,9 @@ CREATE TEMPORARY TABLE nt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE nt_tmp_1;
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -1440,10 +1427,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp_2`
> /* generated by server */
>   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-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';
> @@ -1453,6 +1436,9 @@ CREATE TEMPORARY TABLE tt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE tt_tmp_1;
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
>
> === modified file 'mysql-test/suite/rpl/r/rpl_row_mixing_engines.result'
> --- a/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result	2010-10-27 14:46:44 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result	2010-12-04 11:15:37 +0000
> @@ -12244,9 +12244,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12259,9 +12256,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -12302,9 +12296,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T N Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12317,9 +12308,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T N Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -12360,9 +12348,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn N T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -12375,9 +12360,6 @@ 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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn N T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -13526,18 +13508,12 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T CT 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_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 CT R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13573,31 +13549,17 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn T CT Rn 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_1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -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	#	#	ROLLBACK TO `S_0`
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn T CT Rn R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13628,22 +13590,12 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	Table_map	#	#	table_id: # (test.tt_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->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T 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.tt_1)
> -master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13680,11 +13632,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -13692,10 +13641,6 @@ 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	#	#	COMMIT
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B tN CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13722,18 +13667,12 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B 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.tt_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 CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -13770,11 +13709,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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
> @@ -13782,10 +13718,6 @@ 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	#	#	COMMIT
> -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	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N CT T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  drop-CT<<  -b-b-b-b-b-b-b-b-b-b-b-
>
> === modified 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	2010-08-30
> 06:38:09 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result	2010-12-04
> 11:15:37 +0000
> @@ -559,6 +559,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -576,6 +578,7 @@ DROP TEMPORARY TABLE tt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -593,14 +596,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -612,6 +614,7 @@ DROP TEMPORARY TABLE nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -623,9 +626,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /*
> generated by server */
>   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-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';
> @@ -636,9 +636,6 @@ ERROR 42S02: Unknown table 'test.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';
> @@ -657,9 +654,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   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';
> @@ -671,10 +665,6 @@ Note	1051	Unknown table 'test.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`
> /* generated by server */
> -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';
> @@ -695,11 +685,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   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`
> /* generated by server */
> -master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_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-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';
> @@ -708,6 +693,8 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -727,6 +714,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -746,6 +734,8 @@ DROP TEMPORARY TABLE IF EXISTS tt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -767,6 +757,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -785,14 +776,13 @@ INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_2, tt_1;
>   ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -806,6 +796,7 @@ ERROR 42S02: Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -817,9 +808,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /*
> generated by server */
>   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-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';
> @@ -829,6 +817,8 @@ DROP TEMPORARY TABLE IF EXISTS nt_tmp_2,
>   Warnings:
>   Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -853,6 +843,7 @@ Note	1051	Unknown table 'test.tt_1'
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -876,6 +867,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -896,6 +889,7 @@ DROP TEMPORARY TABLE tt_tmp_1, nt_tmp_1;
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -919,6 +913,8 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -935,6 +931,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -951,14 +948,13 @@ BEGIN;
>   INSERT INTO tt_xx_1() VALUES (1);
>   DROP TEMPORARY TABLE nt_tmp_1, nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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`; DROP TEMPORARY TABLE
> `nt_tmp_1`,`nt_tmp_2` /* generated by server */
>   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-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';
> @@ -969,6 +965,7 @@ INSERT INTO nt_xx_1() VALUES (1);
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1720	Some temporary tables were dropped, but these operations could not 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
> @@ -977,9 +974,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   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-NN-Temp N Drop-Temp-NN-Temp
> R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   #########################################################################
> @@ -1355,6 +1349,9 @@ CREATE TEMPORARY TABLE nt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE nt_tmp_1;
>   DROP TEMPORARY TABLE nt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -1369,9 +1366,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /*
> generated by server */
>   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-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';
> @@ -1381,6 +1375,9 @@ CREATE TEMPORARY TABLE tt_tmp_2 ( id INT
>   DROP TEMPORARY TABLE tt_tmp_1;
>   DROP TEMPORARY TABLE tt_tmp_2;
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   -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
> @@ -1544,9 +1541,6 @@ 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	#	#	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';
> @@ -1594,9 +1588,6 @@ 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	#	#	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-
>
>  
> ###################################################################################
>
> === modified file 'mysql-test/suite/rpl/r/rpl_stm_innodb.result'
> --- a/mysql-test/suite/rpl/r/rpl_stm_innodb.result	2010-06-17 20:51:35 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_stm_innodb.result	2010-12-04 11:15:37 +0000
> @@ -53,6 +53,8 @@ t1	CREATE TABLE `t1` (
>   INSERT INTO mysqltest1.t1 SET f1= 1;
>   DROP TEMPORARY TABLE mysqltest1.tmp;
>   ROLLBACK;
> +Warnings:
> +Warning	1720	Some temporary tables were dropped, but these operations could not be
> rolled back.
>   SHOW CREATE TABLE mysqltest1.tmp;
>   ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
>   ######### Must return no rows here #########
> @@ -62,6 +64,8 @@ COUNT(*)
>   INSERT INTO mysqltest1.t1 SET f1= 2;
>   CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   SHOW CREATE TABLE mysqltest1.tmp2;
>   Table	Create Table
>   tmp2	CREATE TEMPORARY TABLE `tmp2` (
>
> === modified file 'mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result'
> --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result	2010-10-27 14:46:44 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result	2010-12-04 11:15:37 +0000
> @@ -4308,18 +4308,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (153, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (153, 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
> (153, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4342,18 +4336,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (154, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (154, 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
> (154, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4378,18 +4366,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (155, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(155,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
> (155, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4415,9 +4397,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (156, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -4427,9 +4406,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (156, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4452,18 +4428,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (157, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (157, 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
> (157, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4486,18 +4456,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (158, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (158, 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
> (158, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4522,18 +4486,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (159, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(159,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
> (159, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4559,9 +4517,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (160, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -4571,9 +4526,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> (160, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4598,18 +4550,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(161,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (161, 4)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(161,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4634,18 +4580,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(162,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (162, 4)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(162,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4672,18 +4612,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(163,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(163,4)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(163,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4711,9 +4645,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(164,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -4723,9 +4654,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(164,2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4748,20 +4676,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',165),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',165),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (165, 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',165),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',165),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4784,20 +4704,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',166),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',166),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (166, 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',166),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',166),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4822,20 +4734,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',167),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',167),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(167,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',167),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',167),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -4861,10 +4765,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -4874,10 +4774,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -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',168),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',168),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>
> @@ -4994,18 +4890,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (172, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (172, 4), (170, 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
> (172, 2)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>
> @@ -5608,18 +5498,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (189, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (189, 2)
>   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
> (189, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5642,20 +5526,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (190, 2)
>   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',190),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',190),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-proc R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5678,18 +5554,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (191, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (191, 2)
>   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
> (191, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-trig R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5714,18 +5584,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(192,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N 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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (192, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(192,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T-func R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5748,18 +5612,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (193, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (193, 2)
>   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
> (193, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5782,18 +5640,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (194, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (194, 2)
>   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
> (194, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-trig R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5818,18 +5670,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(195,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (195, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(195,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-func R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5852,20 +5698,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-trig 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	#	Query	#	#	use `test`; INSERT INTO nt_5(trans_id, stmt_id)
> VALUES (196, 2)
>   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',196),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',196),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-trig T-proc R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5890,18 +5728,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (197, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(197,2)
>   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
> (197, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5926,18 +5758,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (198, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(198,2)
>   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
> (198, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-trig R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -5964,18 +5790,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(199,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(199,2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(199,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-func R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6000,20 +5820,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N-func 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	#	Query	#	#	use `test`; SELECT `test`.`fc_i_nt_5_suc`(200,2)
>   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',200),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',200),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N-func T-proc R<< 
> -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6039,9 +5851,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (201, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6051,9 +5860,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (201, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6079,10 +5885,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6092,10 +5894,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -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',202),  NAME_CONST('in_stmt_id',1))
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> ( NAME_CONST('p_trans_id',202),  NAME_CONST('in_stmt_id',1) + 1)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6121,9 +5919,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (203, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6133,9 +5928,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_5(trans_id, stmt_id) VALUES
> (203, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6163,9 +5955,6 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(204,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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
> @@ -6175,9 +5964,6 @@ master-bin.000001	#	Query	#	#	COMMIT
>   master-bin.000001	#	Query	#	#	BEGIN
>   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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; SELECT `test`.`fc_i_tt_5_suc`(204,4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>
> @@ -6651,18 +6437,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (219, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id, info)
> SELECT 219, 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
> (219, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -6911,18 +6691,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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) VALUES
> (227, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	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
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (227, 4)
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -8498,18 +8272,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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 276, 2, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -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	#	Query	#	#	use `test`; INSERT INTO nt_1(trans_id, stmt_id)
> VALUES (276, 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, info)
> SELECT 276, 2, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -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-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -9495,18 +9263,12 @@ ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
>   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 304, 4, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  R<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N nT 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_1(trans_id, stmt_id)
> VALUES (304, 2)
>   master-bin.000001	#	Query	#	#	COMMIT
> -master-bin.000001	#	Query	#	#	BEGIN
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id, info)
> SELECT 304, 4, COUNT(*) FROM nt_1
> -master-bin.000001	#	Query	#	#	ROLLBACK
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N nT R<<  -e-e-e-e-e-e-e-e-e-e-e-
>
>   -b-b-b-b-b-b-b-b-b-b-b->>  B<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10014,8 +9776,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B N T Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10026,8 +9786,6 @@ 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 (318, 4)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (318, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B N T Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10066,8 +9824,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (319, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T N Sn T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10078,8 +9834,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (319, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T N Sn T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10118,8 +9872,6 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   master-bin.000001	#	Query	#	#	BEGIN
>   master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id)
> VALUES (320, 2)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  C<<  -e-e-e-e-e-e-e-e-e-e-e-
>   -b-b-b-b-b-b-b-b-b-b-b->>  B T Sn N T Rn C<<  -b-b-b-b-b-b-b-b-b-b-b-
> @@ -10130,8 +9882,6 @@ 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)
>   master-bin.000001	#	Query	#	#	SAVEPOINT `S_0`
> -master-bin.000001	#	Query	#	#	use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES
> (320, 7)
> -master-bin.000001	#	Query	#	#	ROLLBACK TO `S_0`
>   master-bin.000001	#	Xid	#	#	COMMIT /* XID */
>   -e-e-e-e-e-e-e-e-e-e-e->>  B T Sn N T Rn C<<  -e-e-e-e-e-e-e-e-e-e-e-
>
> @@ -10999,6 +10749,8 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -e-e-e-e-e-e-e-e-e-e-e->>  CT<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (351, 2)
> @@ -11046,11 +10798,13 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   -b-b-b-b-b-b-b-b-b-b-b->>  Rn<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK TO S_0;
>   Warnings:
> -Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   Log_name	Pos	Event_type	Server_id	End_log_pos	Info
>   -e-e-e-e-e-e-e-e-e-e-e->>  Rn<<  -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-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (353, 2)
> @@ -11099,6 +10853,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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)
> VALUES (355, 2)
> @@ -11148,6 +10904,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_14 (a int)
> engine=Innodb
> @@ -11189,6 +10946,8 @@ 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->>  R<<  -b-b-b-b-b-b-b-b-b-b-b-
>   ROLLBACK;
> +Warnings:
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_15 (a int)
> engine=Innodb
> @@ -11236,6 +10995,7 @@ Log_name	Pos	Event_type	Server_id	End_lo
>   ROLLBACK;
>   Warnings:
>   Warning	1196	Some non-transactional changed tables couldn't be rolled back
> +Warning	1719	The creation of some temporary tables could not be rolled back.
>   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 tt_xx_16 (a int)
> engine=Innodb
>
> === modified file 'mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test'
> --- a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test	2010-06-30 13:09:43
> +0000
> +++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test	2010-12-04 11:15:37
> +0000
> @@ -171,10 +171,68 @@ SELECT * FROM db1.t2 WHERE s LIKE '% sav
>   --echo # Verify INSERT statements on the Innodb table are rolled back;
>   SELECT * FROM db1.t1 WHERE a IN (30, 40);
>
> +--echo
> +--echo # BUG#55798 Slave SQL retry on transaction inserts extra data into
> +--echo # non-transaction table
> +--echo # ----------------------------------------------------------------
> +--echo # To verify that SQL thread does not retry a transaction which can
> +--echo # not be rolled back safely, even though only a temporary error is
> +--echo # encountered.
> +--echo
> +--echo # [ on master ]
> +connection master;
> +USE db1;
> +DROP TABLE t1, t2;
> +CREATE TABLE t1(c1 INT KEY) ENGINE=MyISAM;
> +CREATE TABLE t2(c1 INT KEY) ENGINE=InnoDB;
> +INSERT INTO t2 VALUES(1);
> +sync_slave_with_master;
> +
> +--echo # [ on slave ]
> +USE db1;
> +
> +let $timeout_old= `SELECT @@GLOBAL.innodb_lock_wait_timeout`;
> +SET GLOBAL innodb_lock_wait_timeout= 1;
> +
> +STOP SLAVE SQL_THREAD;
> +source include/wait_for_slave_sql_to_stop.inc;
> +START SLAVE SQL_THREAD;
> +source include/wait_for_slave_sql_to_start.inc;
> +
> +BEGIN;
> +--echo # It will lock table t2 on row in which c1 is 1 until COMMIT or ROLLBACK
> +UPDATE t2 SET c1=10 WHERE c1=1;
> +
> +connection master;
> +--echo # [ on master ]
> +SET @@session.binlog_direct_non_transactional_updates= FALSE;
> +BEGIN;
> +INSERT INTO t2 VALUES(3);
> +INSERT INTO t1 VALUES(4);
> +UPDATE t2 SET c1=11 WHERE c1=1;
> +COMMIT;
> +
> +connection slave;
> +--echo # [ on slave ]
> +let $slave_sql_errno= 1205;
> +source include/wait_for_slave_sql_to_stop.inc;
> +
> +
> +
> +let $diff_table_1=master:db1.t1;
> +let $diff_table_2=slave:db1.t1;
> +source include/diff_tables.inc;
> +ROLLBACK;
> +DELETE FROM t1 WHERE c1=4;
> +
> +eval SET GLOBAL innodb_lock_wait_timeout= $timeout_old;
> +START SLAVE SQL_THREAD;
> +source include/wait_for_slave_sql_to_start.inc;
> +
>   --echo #
>   --echo # Clean up
>   --echo #
>   connection master;
>   DROP DATABASE db1;
>   DROP DATABASE db2;
> -source include/master-slave-end.inc;
> +source include/master-slave-end.inc;
> \ No newline at end of file
>
> === modified file 'sql/binlog.cc'
> --- a/sql/binlog.cc	2010-11-16 12:38:17 +0000
> +++ b/sql/binlog.cc	2010-12-04 11:15:37 +0000
> @@ -121,16 +121,6 @@ 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);
> @@ -219,11 +209,27 @@ private:
>
>   class binlog_cache_mngr {
>   public:
> -  binlog_cache_mngr() {}
> +  binlog_cache_mngr() : m_trx_cache_cannot_rollback(FALSE) {}
> +
> +  void reset_stmt_cache()
> +  {
> +    stmt_cache.reset();
> +  }
> +
> +  void reset_trx_cache()
> +  {
> +    trx_cache.reset();
> +    m_trx_cache_cannot_rollback= FALSE;
> +  }
> +
> +  void set_trx_cache_cannot_rollback()
> +  {
> +    m_trx_cache_cannot_rollback= TRUE;
> +  }
>
> -  void reset_cache(binlog_cache_data* cache_data)
> +  bool trx_cache_cannot_rollback()
>     {
> -    cache_data->reset();
> +    return m_trx_cache_cannot_rollback;
>     }
>
>     binlog_cache_data* get_binlog_cache_data(bool is_transactional)
> @@ -244,6 +250,12 @@ private:
>
>     binlog_cache_mngr&  operator=(const binlog_cache_mngr&  info);
>     binlog_cache_mngr(const binlog_cache_mngr&  info);
> +
> +  /*
> +    It will be set TRUE if any statement which cannot be rolled back safely
> +    is put in trx_cache.
> +  */
> +  bool m_trx_cache_cannot_rollback;
>   };
>
>   /**
> @@ -406,7 +418,7 @@ binlog_flush_trx_cache(THD *thd, binlog_
>     */
>     error= mysql_bin_log.write(thd,&cache_mngr->trx_cache.cache_log, end_ev,
>                                cache_mngr->trx_cache.has_incident());
> -  cache_mngr->reset_cache(&cache_mngr->trx_cache);
> +  cache_mngr->reset_trx_cache();
>
>     statistic_increment(binlog_cache_use,&LOCK_status);
>     if (cache_log->disk_writes != 0)
> @@ -456,7 +468,7 @@ binlog_truncate_trx_cache(THD *thd, binl
>       if (cache_mngr->trx_cache.has_incident())
>         error= mysql_bin_log.write_incident(thd, TRUE);
>
> -    cache_mngr->reset_cache(&cache_mngr->trx_cache);
> +    cache_mngr->reset_trx_cache();
>
>       thd->clear_binlog_table_maps();
>     }
> @@ -465,7 +477,10 @@ binlog_truncate_trx_cache(THD *thd, binl
>       transaction cache to remove the statement.
>     */
>     else
> +  {
>       cache_mngr->trx_cache.restore_prev_position();
> +    cache_mngr->trx_cache.set_prev_position(MY_OFF_T_UNDEF);
> +  }
>
>     DBUG_ASSERT(thd->binlog_get_pending_rows_event(is_transactional) == NULL);
>     DBUG_RETURN(error);
> @@ -516,7 +531,7 @@ binlog_flush_stmt_cache(THD *thd, binlog
>     if ((error= mysql_bin_log.write(thd, cache_log,&qev,
>                                     cache_mngr->stmt_cache.has_incident())))
>       DBUG_RETURN(error);
> -  cache_mngr->reset_cache(&cache_mngr->stmt_cache);
> +  cache_mngr->reset_stmt_cache();
>
>     statistic_increment(binlog_cache_use,&LOCK_status);
>     if (cache_log->disk_writes != 0)
> @@ -547,11 +562,11 @@ static int binlog_commit(handlerton *hto
>       (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
>
>     DBUG_PRINT("debug",
> -             ("all: %d, in_transaction: %s, all.modified_non_trans_table: %s,
> stmt.modified_non_trans_table: %s",
> +             ("all: %d, in_transaction: %s, all.cannot_safe_rollback(): %s,
> stmt.cannot_safe_rollback(): %s",
>                 all,
>                 YESNO(thd->in_multi_stmt_transaction_mode()),
> -              YESNO(thd->transaction.all.modified_non_trans_table),
> -              YESNO(thd->transaction.stmt.modified_non_trans_table)));
> +              YESNO(thd->transaction.all.cannot_safe_rollback()),
> +              YESNO(thd->transaction.stmt.cannot_safe_rollback())));
>
>     if (!cache_mngr->stmt_cache.empty())
>     {
> @@ -563,7 +578,7 @@ static int binlog_commit(handlerton *hto
>       /*
>         we're here because cache_log was flushed in MYSQL_BIN_LOG::log_xid()
>       */
> -    cache_mngr->reset_cache(&cache_mngr->trx_cache);
> +    cache_mngr->reset_trx_cache();
>       DBUG_RETURN(0);
>     }
>
> @@ -604,10 +619,10 @@ static int binlog_rollback(handlerton *h
>     binlog_cache_mngr *const cache_mngr=
>       (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
>
> -  DBUG_PRINT("debug", ("all: %s, all.modified_non_trans_table: %s,
> stmt.modified_non_trans_table: %s",
> +  DBUG_PRINT("debug", ("all: %s, all.cannot_safe_rollback(): %s,
> stmt.cannot_safe_rollback(): %s",
>                          YESNO(all),
> -                       YESNO(thd->transaction.all.modified_non_trans_table),
> -                       YESNO(thd->transaction.stmt.modified_non_trans_table)));
> +                       YESNO(thd->transaction.all.cannot_safe_rollback()),
> +                       YESNO(thd->transaction.stmt.cannot_safe_rollback())));
>
>     /*
>       If an incident event is set we do not flush the content of the statement
> @@ -616,7 +631,7 @@ static int binlog_rollback(handlerton *h
>     if (cache_mngr->stmt_cache.has_incident())
>     {
>       error= mysql_bin_log.write_incident(thd, TRUE);
> -    cache_mngr->reset_cache(&cache_mngr->stmt_cache);
> +    cache_mngr->reset_stmt_cache();
>     }
>     else if (!cache_mngr->stmt_cache.empty())
>     {
> @@ -628,7 +643,7 @@ static int binlog_rollback(handlerton *h
>       /*
>         we're here because cache_log was flushed in MYSQL_BIN_LOG::log_xid()
>       */
> -    cache_mngr->reset_cache(&cache_mngr->trx_cache);
> +    cache_mngr->reset_trx_cache();
>       DBUG_RETURN(0);
>     }
>
> @@ -646,57 +661,25 @@ static int binlog_rollback(handlerton *h
>         a cache and need to be rolled back.
>       */
>       error= binlog_truncate_trx_cache(thd, cache_mngr, all);
> +    DBUG_RETURN(error);
>     }
> -  else
> -  {
> -    /*
> -      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) ||
> -         (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)))
> +
> +  if (cache_mngr->trx_cache_cannot_rollback())
> +  {
> +    if (ending_trans(thd, all))
>       {
>         Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE, TRUE, 0);
>         error= binlog_flush_trx_cache(thd, cache_mngr,&qev);
>       }
> -    /*
> -      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 was updated and;
> -        . the format is not MIXED or no temporary non-trans 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)&&
> -              (!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);
> +    else
> +    {
> +      /* The statement should be kept in trx_cache. */
> +      cache_mngr->trx_cache.set_prev_position(MY_OFF_T_UNDEF);
> +    }
>     }
> -  /*
> -    This is part of the stmt rollback.
> -  */
> -  if (!all)
> -    cache_mngr->trx_cache.set_prev_position(MY_OFF_T_UNDEF);
> +  else
> +    error= binlog_truncate_trx_cache(thd, cache_mngr, all);
> +
>     DBUG_RETURN(error);
>   }
>
> @@ -767,8 +750,10 @@ static int binlog_savepoint_rollback(han
>       non-transactional table. Otherwise, truncate the binlog cache starting
>       from the SAVEPOINT command.
>     */
> -  if (unlikely(trans_has_updated_non_trans_table(thd) ||
> -               (thd->variables.option_bits&  OPTION_KEEP_LOG)))
> +  binlog_cache_mngr *const cache_mngr=
> +    (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
> +
> +  if (unlikely(cache_mngr->trx_cache_cannot_rollback()))
>     {
>       String log_query;
>       if (log_query.append(STRING_WITH_LEN("ROLLBACK TO ")) ||
> @@ -1032,31 +1017,15 @@ bool ending_single_stmt_trans(THD* thd,
>   }
>
>   /**
> -  This function checks if a non-transactional table was updated by
> -  the current transaction.
> -
> -  @param thd The client thread that executed the current statement.
> -  @return
> -    @c true if a non-transactional table was updated, @c false
> -    otherwise.
> -*/
> -bool trans_has_updated_non_trans_table(const THD* thd)
> -{
> -  return (thd->transaction.all.modified_non_trans_table ||
> -          thd->transaction.stmt.modified_non_trans_table);
> -}
> -
> -/**
> -  This function checks if a non-transactional table was updated by the
> -  current statement.
> +  This function checks if current statement cannot be rollded back safely.
>
>     @param thd The client thread that executed the current statement.
>     @return
>       @c true if a non-transactional table was updated, @c false otherwise.
>   */
> -bool stmt_has_updated_non_trans_table(const THD* thd)
> +bool stmt_cannot_safe_rollback(const THD* thd)
>   {
> -  return (thd->transaction.stmt.modified_non_trans_table);
> +  return thd->transaction.stmt.cannot_safe_rollback();
>   }
>
>   #ifndef EMBEDDED_LIBRARY
> @@ -3021,7 +2990,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_row
>       {
>         set_write_error(thd);
>         if (check_write_error(thd)&&  cache_data&&
> -          stmt_has_updated_non_trans_table(thd))
> +          stmt_cannot_safe_rollback(thd))
>           cache_data->set_incident();
>         DBUG_RETURN(1);
>       }
> @@ -3090,6 +3059,8 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
>   #endif /* HAVE_REPLICATION */
>
>       IO_CACHE *file= NULL;
> +    bool is_trans_cache= FALSE;
> +    binlog_cache_mngr *cache_mngr= NULL;
>
>       if (event_info->use_direct_logging())
>       {
> @@ -3101,16 +3072,11 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
>         if (thd->binlog_setup_trx_data())
>           goto err;
>
> -      binlog_cache_mngr *const cache_mngr=
> -        (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
> -
> -      bool is_trans_cache= use_trans_cache(thd, event_info->use_trans_cache());
> +      cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
> +      is_trans_cache= use_trans_cache(thd, event_info->use_trans_cache());
>         file= cache_mngr->get_binlog_cache_log(is_trans_cache);
>         cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache);
>
> -      if (thd->lex->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()));
> @@ -3185,7 +3151,8 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
>         goto err;
>
>       error= 0;
> -
> +    if (is_trans_cache&&  stmt_cannot_safe_rollback(thd))
> +      cache_mngr->set_trx_cache_cannot_rollback();
>   err:
>       if (event_info->use_direct_logging())
>       {
> @@ -3212,7 +3179,7 @@ unlock:
>       {
>         set_write_error(thd);
>         if (check_write_error(thd)&&  cache_data&&
> -          stmt_has_updated_non_trans_table(thd))
> +          stmt_cannot_safe_rollback(thd))
>           cache_data->set_incident();
>       }
>     }
>
> === modified file 'sql/binlog.h'
> --- a/sql/binlog.h	2010-11-16 09:38:43 +0000
> +++ b/sql/binlog.h	2010-12-04 11:15:37 +0000
> @@ -252,8 +252,7 @@ bool stmt_has_updated_trans_table(const
>   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);
> +bool stmt_cannot_safe_rollback(const THD* thd);
>
>   int log_loaded_block(IO_CACHE* file);
>   File open_binlog(IO_CACHE *log, const char *log_file_name,
>
> === modified file 'sql/ha_ndbcluster.cc'
> --- a/sql/ha_ndbcluster.cc	2010-10-21 13:05:32 +0000
> +++ b/sql/ha_ndbcluster.cc	2010-12-04 11:15:37 +0000
> @@ -4609,8 +4609,8 @@ void ha_ndbcluster::transaction_checks(T
>     {
>       m_transaction_on= FALSE;
>       /* Would be simpler if has_transactions() didn't always say "yes" */
> -    thd->transaction.all.modified_non_trans_table=
> -      thd->transaction.stmt.modified_non_trans_table= TRUE;
> +    thd->transaction.all.modified_non_trans_table();
> +    thd->transaction.stmt.modified_non_trans_table();
>     }
>     else if (!thd->transaction.on)
>       m_transaction_on= FALSE;
>
> === modified file 'sql/ha_ndbcluster_binlog.cc'
> --- a/sql/ha_ndbcluster_binlog.cc	2010-10-21 09:49:16 +0000
> +++ b/sql/ha_ndbcluster_binlog.cc	2010-12-04 11:15:37 +0000
> @@ -267,7 +267,7 @@ static void run_query(THD *thd, char *bu
>     bzero((char*)&thd->net, sizeof(NET));
>     thd->set_query(buf, (uint) (end - buf));
>     thd->variables.pseudo_thread_id= thread_id;
> -  thd->transaction.stmt.modified_non_trans_table= FALSE;
> +  thd->transaction.stmt.reset_unsafe_rollback_flags();
>     if (disable_binlog)
>       thd->variables.option_bits&= ~OPTION_BIN_LOG;
>
>
> === modified file 'sql/handler.cc'
> --- a/sql/handler.cc	2010-11-16 10:05:56 +0000
> +++ b/sql/handler.cc	2010-12-04 11:15:37 +0000
> @@ -1386,19 +1386,17 @@ int ha_rollback_trans(THD *thd, bool all
>       thd->transaction_rollback_request= FALSE;
>
>     /*
> -    If a non-transactional table was updated, warn; don't warn if this is a
> -    slave thread (because when a slave thread executes a ROLLBACK, it has
> +    If the transaction cannot be rolled back safely, warn; don't warn if this
> +    is a slave thread (because when a slave thread executes a ROLLBACK, it has
>       been read from the binary log, so it's 100% sure and normal to produce
>       error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the
>       slave SQL thread, it would not stop the thread but just be printed in
>       the error log; but we don't want users to wonder why they have this
>       message in the error log, so we don't send it.
>     */
> -  if (is_real_trans&& 
> thd->transaction.all.modified_non_trans_table&&
> +  if (is_real_trans&& 
> thd->transaction.all.cannot_safe_rollback()&&
>         !thd->slave_thread&&  thd->killed != THD::KILL_CONNECTION)
> -    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> -                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
> -                 ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
> +    thd->transaction.push_unsafe_rollback_warnings(thd);
>     RUN_HOOK(transaction, after_rollback, (thd, FALSE));
>     DBUG_RETURN(error);
>   }
>
> === modified file 'sql/handler.h'
> --- a/sql/handler.h	2010-11-16 00:21:26 +0000
> +++ b/sql/handler.h	2010-12-04 11:15:37 +0000
> @@ -830,36 +830,93 @@ struct THD_TRANS
>     /* storage engines that registered in this transaction */
>     Ha_trx_info *ha_list;
>     /*
> -    The purpose of this flag is to keep track of non-transactional
> -    tables that were modified in scope of:
> -    - transaction, when the variable is a member of
> -    THD::transaction.all
> +    The purpose of this flag is to keep track of statements which cannot be
> +    rolled back safely(completely). For example, statements modified
> +    non-transactional tables, 'DROP TEMPORARY TABLE' and
> +    'CREATE TEMPORARY TABLE' statements. The tracked statements are
> +    modified in scope of:
> +    - transaction, when the variable is a member of THD::transaction.all
>       - top-level statement or sub-statement, when the variable is a
>       member of THD::transaction.stmt
>       This member has the following life cycle:
> -    * stmt.modified_non_trans_table is used to keep track of
> -    modified non-transactional tables of top-level statements. At
> -    the end of the previous statement and at the beginning of the session,
> -    it is reset to FALSE.  If such functions
> -    as mysql_insert, mysql_update, mysql_delete etc modify a
> -    non-transactional table, they set this flag to TRUE.  At the
> -    end of the statement, the value of stmt.modified_non_trans_table
> -    is merged with all.modified_non_trans_table and gets reset.
> -    * all.modified_non_trans_table is reset at the end of transaction
> -
> -    * Since we do not have a dedicated context for execution of a
> -    sub-statement, to keep track of non-transactional changes in a
> -    sub-statement, we re-use stmt.modified_non_trans_table.
> -    At entrance into a sub-statement, a copy of the value of
> -    stmt.modified_non_trans_table (containing the changes of the
> -    outer statement) is saved on stack. Then
> -    stmt.modified_non_trans_table is reset to FALSE and the
> -    substatement is executed. Then the new value is merged with the
> -    saved value.
> +    * stmt.unsafe_rollback_flags is used to keep track of top-level statements
> +    which cannot be rolled back safely. At the end of the previous statement
> +    and at the beginning of the session, it is reset to 0.  If such functions
> +    as mysql_insert, mysql_update, mysql_delete etc modify a non-transactional
> +    table, flag MODIFIED_NON_TRANS_TABLE is set.  After 'CREATE TEMPORARY TABLE'
> +    creates a table successfully, flag CREATED_TEMP_TABLE is set. After
> +    'DROP TEMPORARY TABLE' drops a temporary table, flag DROPPED_TEMP_TABLE is
> +    set.  At the end of the statement, the value of stmt.unsafe_rollback_flags
> +    is merged with all.unsafe_rollback_flags and gets reset.
> +    * all.cannot_safe_rollback is reset at the end of transaction
> +
> +    * Since we do not have a dedicated context for execution of a sub-statement,
> +    to keep track of non-transactional changes in a sub-statement, we re-use
> +    stmt.unsafe_rollback_flags.  At entrance into a sub-statement, a copy of the
> +    value of stmt.unsafe_rollback_flags (containing the changes of the outer
> +    statement) is saved on stack.  Then stmt.unsafe_rollback_flags is reset
> +    to FALSE and the substatement is executed. Then the new value is merged with
> +    the saved value.
> +  */
> +private:
> +  unsigned int unsafe_rollback_flags;
> +  /*
> +    Define the type of statemens which cannot be rolled back safely.
> +    Each type occupies one bit in cannot_safe_rollback.
>     */
> -  bool modified_non_trans_table;
> +  enum
> +  {
> +    MODIFIED_NON_TRANS_TABLE= 0x01,
> +    CREATED_TEMP_TABLE= 0x02,
> +    DROPPED_TEMP_TABLE= 0x04
> +  };
> +public:
> +  bool cannot_safe_rollback() const
> +  {
> +    return unsafe_rollback_flags>  0;
> +  }
> +  unsigned int get_unsafe_rollback_flags() const
> +  {
> +    return unsafe_rollback_flags;
> +  }
> +  void set_unsafe_rollback_flags(unsigned int flags)
> +  {
> +    unsafe_rollback_flags= flags;
> +  }
> +  void add_unsafe_rollback_flags(unsigned int flags)
> +  {
> +    unsafe_rollback_flags|= flags;
> +  }
> +  void reset_unsafe_rollback_flags()
> +  {
> +    unsafe_rollback_flags= 0;
> +  }
> +  void modified_non_trans_table()
> +  {
> +    unsafe_rollback_flags= MODIFIED_NON_TRANS_TABLE;
> +  }
> +  bool has_modified_non_trans_table() const
> +  {
> +    return unsafe_rollback_flags&  MODIFIED_NON_TRANS_TABLE;
> +  }
> +  void created_temp_table()
> +  {
> +    unsafe_rollback_flags= CREATED_TEMP_TABLE;
> +  }
> +  bool has_created_temp_table() const
> +  {
> +    return unsafe_rollback_flags&  CREATED_TEMP_TABLE;
> +  }
> +  void dropped_temp_table()
> +  {
> +    unsafe_rollback_flags= DROPPED_TEMP_TABLE;
> +  }
> +  bool has_dropped_temp_table() const
> +  {
> +    return unsafe_rollback_flags&  DROPPED_TEMP_TABLE;
> +  }
>
> -  void reset() { no_2pc= FALSE; modified_non_trans_table= FALSE; }
> +  void reset() { no_2pc= FALSE; reset_unsafe_rollback_flags(); }
>     bool is_empty() const { return ha_list == NULL; }
>   };
>
>
> === modified file 'sql/log_event.cc'
> --- a/sql/log_event.cc	2010-11-08 02:49:16 +0000
> +++ b/sql/log_event.cc	2010-12-04 11:15:37 +0000
> @@ -3455,7 +3455,7 @@ Default database: '%s'. Query: '%s'",
>                       if (strcmp("COMMIT", query) != 0&&
>                           strcmp("BEGIN", query) != 0)
>                       {
> -                      if (thd->transaction.all.modified_non_trans_table)
> +                      if (thd->transaction.all.cannot_safe_rollback())
>                           const_cast<Relay_log_info*>(rli)->abort_slave= 1;
>                       };);
>     }
> @@ -7377,7 +7377,7 @@ int Rows_log_event::do_apply_event(Relay
>         has not yet modified anything. Note, all.modified is reset
>         by mysql_reset_thd_for_next_command.
>       */
> -    thd->transaction.stmt.modified_non_trans_table= FALSE;
> +    thd->transaction.stmt.reset_unsafe_rollback_flags();
>       /*
>         This is a row injection, so we flag the "statement" as
>         such. Note that this code is called both when the slave does row
> @@ -7612,8 +7612,10 @@ int Rows_log_event::do_apply_event(Relay
>         m_curr_row= m_curr_row_end;
>
>         if (error == 0&&  !transactional_table)
> -        thd->transaction.all.modified_non_trans_table=
> -          thd->transaction.stmt.modified_non_trans_table= TRUE;
> +      {
> +        thd->transaction.all.modified_non_trans_table();
> +        thd->transaction.stmt.modified_non_trans_table();
> +      }
>
>         if (m_curr_row == m_rows_end)
>           break;
> @@ -7626,7 +7628,7 @@ int Rows_log_event::do_apply_event(Relay
>            to shutdown trying to finish incomplete events group.
>        */
>         DBUG_EXECUTE_IF("stop_slave_middle_group",
> -                      if (thd->transaction.all.modified_non_trans_table)
> +                      if (thd->transaction.all.cannot_safe_rollback())
>                           const_cast<Relay_log_info*>(rli)->abort_slave=
> 1;);
>       }
>
>
> === modified file 'sql/rpl_slave.cc'
> --- a/sql/rpl_slave.cc	2010-11-16 12:38:17 +0000
> +++ b/sql/rpl_slave.cc	2010-12-04 11:15:37 +0000
> @@ -1008,17 +1008,7 @@ static bool sql_slave_killed(THD* thd, R
>     DBUG_ASSERT(rli->slave_running == 1);// tracking buffer overrun
>     if (abort_loop || thd->killed || rli->abort_slave)
>     {
> -    /*
> -      The transaction should always be binlogged if OPTION_KEEP_LOG is set
> -      (it implies that something can not be rolled back). And such case
> -      should be regarded similarly as modifing a non-transactional table
> -      because retrying of the transaction will lead to an error or inconsistency
> -      as well.
> -      Example: OPTION_KEEP_LOG is set if a temporary table is created or dropped.
> -    */
> -    if ((thd->transaction.all.modified_non_trans_table ||
> -         (thd->variables.option_bits&  OPTION_KEEP_LOG))
> -&&  rli->is_in_group())
> +    if (thd->transaction.all.cannot_safe_rollback()&& 
> rli->is_in_group())
>       {
>         char msg_stopped[]=
>           "... The slave SQL is stopped, leaving the current group "
> @@ -2757,7 +2747,7 @@ static int exec_relay_log_event(THD* thd
>                             ((ev->get_type_code() == QUERY_EVENT)&&
>                              strcmp("COMMIT", ((Query_log_event *) ev)->query) ==
> 0))
>                         {
> -                       
> DBUG_ASSERT(thd->transaction.all.modified_non_trans_table);
> +                       
> DBUG_ASSERT(thd->transaction.all.cannot_safe_rollback());
>                           rli->abort_slave= 1;
>                           mysql_mutex_unlock(&rli->data_lock);
>                           delete ev;
> @@ -2796,7 +2786,8 @@ static int exec_relay_log_event(THD* thd
>       if (slave_trans_retries)
>       {
>         int UNINIT_VAR(temp_err);
> -      if (exec_res&&  (temp_err= has_temporary_error(thd)))
> +      if (exec_res&&  (temp_err= has_temporary_error(thd))&&
> +          !thd->transaction.all.cannot_safe_rollback())
>         {
>           const char *errmsg;
>           /*
>
> === modified file 'sql/share/errmsg-utf8.txt'
> --- a/sql/share/errmsg-utf8.txt	2010-10-29 09:43:58 +0000
> +++ b/sql/share/errmsg-utf8.txt	2010-12-04 11:15:37 +0000
> @@ -6439,3 +6439,9 @@ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MA
>   ER_PARTITION_EXCHANGE_FOREIGN_KEY
>     eng "Table to exchange with partition has foreign key references: '%-.64s'"
>     swe "Tabellen att byta ut mot partition har foreign key referenser: '%-.64s'"
> +
> +ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE
> +  eng "The creation of some temporary tables could not be rolled back."
> +
> +ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE
> +  eng "Some temporary tables were dropped, but these operations could not be rolled
> back."
>
> === modified file 'sql/sp_head.cc'
> --- a/sql/sp_head.cc	2010-11-11 09:40:06 +0000
> +++ b/sql/sp_head.cc	2010-12-04 11:15:37 +0000
> @@ -376,8 +376,8 @@ sp_eval_expr(THD *thd, Field *result_fie
>     Item *expr_item;
>     enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
>     bool save_abort_on_warning= thd->abort_on_warning;
> -  bool save_stmt_modified_non_trans_table=
> -    thd->transaction.stmt.modified_non_trans_table;
> +  unsigned int stmt_unsafe_rollback_flags=
> +    thd->transaction.stmt.get_unsafe_rollback_flags();
>
>     DBUG_ENTER("sp_eval_expr");
>
> @@ -398,7 +398,7 @@ sp_eval_expr(THD *thd, Field *result_fie
>     thd->abort_on_warning=
>       thd->variables.sql_mode&
>       (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES);
> -  thd->transaction.stmt.modified_non_trans_table= FALSE;
> +  thd->transaction.stmt.reset_unsafe_rollback_flags();
>
>     /* Save the value in the field. Convert the value if needed. */
>
> @@ -406,7 +406,7 @@ sp_eval_expr(THD *thd, Field *result_fie
>
>     thd->count_cuted_fields= save_count_cuted_fields;
>     thd->abort_on_warning= save_abort_on_warning;
> -  thd->transaction.stmt.modified_non_trans_table=
> save_stmt_modified_non_trans_table;
> +  thd->transaction.stmt.set_unsafe_rollback_flags(stmt_unsafe_rollback_flags);
>
>     if (!thd->is_error())
>       DBUG_RETURN(FALSE);
> @@ -2912,11 +2912,13 @@ sp_lex_keeper::reset_lex_and_exec_core(T
>       It's reset further in the common code part.
>       It's merged with the saved parent's value at the exit of this func.
>     */
> -  bool parent_modified_non_trans_table=
> thd->transaction.stmt.modified_non_trans_table;
> -  if (check_stack_overrun(thd, STACK_MIN_SIZE,
> (uchar*)&parent_modified_non_trans_table))
> +  unsigned int parent_unsafe_rollback_flags=
> +    thd->transaction.stmt.get_unsafe_rollback_flags();
> +  if (check_stack_overrun(thd, STACK_MIN_SIZE,
> +                          (uchar*)&parent_unsafe_rollback_flags))
>       DBUG_RETURN(TRUE);
>
> -  thd->transaction.stmt.modified_non_trans_table= FALSE;
> +  thd->transaction.stmt.reset_unsafe_rollback_flags();
>     DBUG_ASSERT(!thd->derived_tables);
>     DBUG_ASSERT(thd->change_list.is_empty());
>     /*
> @@ -3011,7 +3013,7 @@ sp_lex_keeper::reset_lex_and_exec_core(T
>       Merge here with the saved parent's values
>       what is needed from the substatement gained
>     */
> -  thd->transaction.stmt.modified_non_trans_table |=
> parent_modified_non_trans_table;
> +  thd->transaction.stmt.add_unsafe_rollback_flags(parent_unsafe_rollback_flags);
>     /*
>       Unlike for PS we should not call Item's destructors for newly created
>       items after execution of each instruction in stored routine. This is
>
> === modified file 'sql/sql_class.cc'
> --- a/sql/sql_class.cc	2010-11-16 00:21:26 +0000
> +++ b/sql/sql_class.cc	2010-12-04 11:15:37 +0000
> @@ -938,8 +938,8 @@ void THD::init(void)
>     if (variables.sql_mode&  MODE_NO_BACKSLASH_ESCAPES)
>       server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
>
> -  transaction.all.modified_non_trans_table=
> -    transaction.stmt.modified_non_trans_table= FALSE;
> +  transaction.all.reset_unsafe_rollback_flags();
> +  transaction.stmt.reset_unsafe_rollback_flags();
>     open_options=ha_open_options;
>     update_lock_default= (variables.low_priority_updates ?
>   			TL_WRITE_LOW_PRIORITY :
> @@ -3193,7 +3193,7 @@ extern "C" int thd_slave_thread(const MY
>
>   extern "C" int thd_non_transactional_update(const MYSQL_THD thd)
>   {
> -  return(thd->transaction.all.modified_non_trans_table);
> +  return thd->transaction.all.has_modified_non_trans_table();
>   }
>
>   extern "C" int thd_binlog_format(const MYSQL_THD thd)
>
> === modified file 'sql/sql_class.h'
> --- a/sql/sql_class.h	2010-11-05 08:13:09 +0000
> +++ b/sql/sql_class.h	2010-12-04 11:15:37 +0000
> @@ -1675,6 +1675,23 @@ public:
>         xid_state.xid.null();
>         init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
>       }
> +    void push_unsafe_rollback_warnings(THD *thd)
> +    {
> +      if (all.has_modified_non_trans_table())
> +        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> +                     ER_WARNING_NOT_COMPLETE_ROLLBACK,
> +                     ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
> +
> +      if (all.has_created_temp_table())
> +        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> +                     ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE,
> +                     ER(ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE));
> +
> +      if (all.has_dropped_temp_table())
> +        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> +                     ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE,
> +                     ER(ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE));
> +    }
>     } transaction;
>     Global_read_lock global_read_lock;
>     Field      *dup_field;
> @@ -2458,7 +2475,7 @@ public:
>     inline bool really_abort_on_warning()
>     {
>       return (abort_on_warning&&
> -            (!transaction.stmt.modified_non_trans_table ||
> +            (!transaction.stmt.cannot_safe_rollback() ||
>                (variables.sql_mode&  MODE_STRICT_ALL_TABLES)));
>     }
>     void set_status_var_init();
>
> === modified file 'sql/sql_delete.cc'
> --- a/sql/sql_delete.cc	2010-10-21 11:34:17 +0000
> +++ b/sql/sql_delete.cc	2010-12-04 11:15:37 +0000
> @@ -372,11 +372,10 @@ cleanup:
>     transactional_table= table->file->has_transactions();
>
>     if (!transactional_table&&  deleted>  0)
> -    thd->transaction.stmt.modified_non_trans_table=
> -      thd->transaction.all.modified_non_trans_table= TRUE;
> +    thd->transaction.stmt.modified_non_trans_table();
>
>     /* See similar binlogging code in sql_update.cc, for comments */
> -  if ((error<  0) || thd->transaction.stmt.modified_non_trans_table)
> +  if ((error<  0) || thd->transaction.stmt.cannot_safe_rollback())
>     {
>       if (mysql_bin_log.is_open())
>       {
> @@ -403,7 +402,7 @@ cleanup:
>         }
>       }
>     }
> -  DBUG_ASSERT(transactional_table || !deleted ||
> thd->transaction.stmt.modified_non_trans_table);
> +  DBUG_ASSERT(transactional_table || !deleted ||
> thd->transaction.stmt.cannot_safe_rollback());
>     free_underlaid_joins(thd, select_lex);
>     if (error<  0 ||
>         (thd->lex->ignore&&  !thd->is_error()&& 
> !thd->is_fatal_error))
> @@ -727,7 +726,7 @@ bool multi_delete::send_data(List<Item>
>         {
>           deleted++;
>           if (!table->file->has_transactions())
> -          thd->transaction.stmt.modified_non_trans_table= TRUE;
> +          thd->transaction.stmt.modified_non_trans_table();
>           if (table->triggers&&
>               table->triggers->process_triggers(thd, TRG_EVENT_DELETE,
>                                                 TRG_ACTION_AFTER, FALSE))
> @@ -774,16 +773,13 @@ void multi_delete::abort_result_set()
>
>     /* the error was handled or nothing deleted and no side effects return */
>     if (error_handled ||
> -      (!thd->transaction.stmt.modified_non_trans_table&&  !deleted))
> +      (!thd->transaction.stmt.cannot_safe_rollback()&&  !deleted))
>       DBUG_VOID_RETURN;
>
>     /* Something already deleted so we have to invalidate cache */
>     if (deleted)
>       query_cache_invalidate3(thd, delete_tables, 1);
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -    thd->transaction.all.modified_non_trans_table= TRUE;
> -
>     /*
>       If rows from the first table only has been deleted and it is
>       transactional, just do rollback.
> @@ -804,7 +800,7 @@ void multi_delete::abort_result_set()
>       DBUG_VOID_RETURN;
>     }
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> +  if (thd->transaction.stmt.cannot_safe_rollback())
>     {
>       /*
>          there is only side effects; to binlog with the error
> @@ -941,7 +937,7 @@ int multi_delete::do_table_deletes(TABLE
>       }
>     }
>     if (last_deleted != deleted&&  !table->file->has_transactions())
> -    thd->transaction.stmt.modified_non_trans_table= TRUE;
> +    thd->transaction.stmt.modified_non_trans_table();
>
>     end_read_record(&info);
>
> @@ -969,9 +965,6 @@ bool multi_delete::send_eof()
>     /* reset used flags */
>     thd_proc_info(thd, "end");
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -    thd->transaction.all.modified_non_trans_table= TRUE;
> -
>     /*
>       We must invalidate the query cache before binlog writing and
>       ha_autocommit_...
> @@ -980,7 +973,7 @@ bool multi_delete::send_eof()
>     {
>       query_cache_invalidate3(thd, delete_tables, 1);
>     }
> -  if ((local_error == 0) || thd->transaction.stmt.modified_non_trans_table)
> +  if ((local_error == 0) || thd->transaction.stmt.cannot_safe_rollback())
>     {
>       if (mysql_bin_log.is_open())
>       {
>
> === modified file 'sql/sql_insert.cc'
> --- a/sql/sql_insert.cc	2010-11-16 00:21:26 +0000
> +++ b/sql/sql_insert.cc	2010-12-04 11:15:37 +0000
> @@ -983,11 +983,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
>         query_cache_invalidate3(thd, table_list, 1);
>       }
>
> -    if (thd->transaction.stmt.modified_non_trans_table)
> -      thd->transaction.all.modified_non_trans_table= TRUE;
> -
>       if ((changed&&  error<= 0) ||
> -        thd->transaction.stmt.modified_non_trans_table ||
> +        thd->transaction.stmt.cannot_safe_rollback() ||
>           was_insert_delayed)
>       {
>         if (mysql_bin_log.is_open())
> @@ -1048,7 +1045,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *t
>         }
>       }
>       DBUG_ASSERT(transactional_table || !changed ||
> -                thd->transaction.stmt.modified_non_trans_table);
> +                thd->transaction.stmt.cannot_safe_rollback());
>     }
>     thd_proc_info(thd, "end");
>     /*
> @@ -1488,8 +1485,8 @@ static int last_uniq_key(TABLE *table,ui
>       then both on update triggers will work instead. Similarly both on
>       delete triggers will be invoked if we will delete conflicting records.
>
> -    Sets thd->transaction.stmt.modified_non_trans_table to TRUE if table which is
> updated didn't have
> -    transactions.
> +    Call thd->transaction.stmt.modified_non_trans_table() if table is a
> +    a non-transactional table.
>
>     RETURN VALUE
>       0     - success
> @@ -1706,7 +1703,7 @@ int write_record(THD *thd, TABLE *table,
>               goto err;
>             info->deleted++;
>             if (!table->file->has_transactions())
> -            thd->transaction.stmt.modified_non_trans_table= TRUE;
> +            thd->transaction.stmt.modified_non_trans_table();
>             if (table->triggers&&
>                 table->triggers->process_triggers(thd, TRG_EVENT_DELETE,
>                                                   TRG_ACTION_AFTER, TRUE))
> @@ -1758,7 +1755,7 @@ ok_or_after_trg_err:
>     if (key)
>       my_safe_afree(key,table->s->max_unique_length,MAX_KEY_LENGTH);
>     if (!table->file->has_transactions())
> -    thd->transaction.stmt.modified_non_trans_table= TRUE;
> +    thd->transaction.stmt.modified_non_trans_table();
>     DBUG_RETURN(trg_error);
>
>   err:
> @@ -3556,11 +3553,8 @@ bool select_insert::send_eof()
>       query_cache_invalidate3(thd, table, 1);
>     }
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -    thd->transaction.all.modified_non_trans_table= TRUE;
> -
>     DBUG_ASSERT(trans_table || !changed ||
> -              thd->transaction.stmt.modified_non_trans_table);
> +              thd->transaction.stmt.cannot_safe_rollback());
>
>     /*
>       Write to binlog before commiting transaction.  No statement will
> @@ -3569,7 +3563,7 @@ bool select_insert::send_eof()
>       ha_autocommit_or_rollback() is issued below.
>     */
>     if (mysql_bin_log.is_open()&&
> -      (!error || thd->transaction.stmt.modified_non_trans_table))
> +      (!error || thd->transaction.stmt.cannot_safe_rollback()))
>     {
>       int errcode= 0;
>       if (!error)
> @@ -3647,10 +3641,10 @@ void select_insert::abort_result_set() {
>       */
>       changed= (info.copied || info.deleted || info.updated);
>       transactional_table= table->file->has_transactions();
> -    if (thd->transaction.stmt.modified_non_trans_table)
> +    if (thd->transaction.stmt.cannot_safe_rollback())
>       {
>           if (!can_rollback_data())
> -          thd->transaction.all.modified_non_trans_table= TRUE;
> +          thd->transaction.all.modified_non_trans_table();
>
>           if (mysql_bin_log.is_open())
>           {
> @@ -3664,7 +3658,7 @@ void select_insert::abort_result_set() {
>   	  query_cache_invalidate3(thd, table, 1);
>       }
>       DBUG_ASSERT(transactional_table || !changed ||
> -		thd->transaction.stmt.modified_non_trans_table);
> +		thd->transaction.stmt.cannot_safe_rollback());
>       table->file->ha_release_auto_increment();
>     }
>
> @@ -4084,6 +4078,9 @@ void select_create::send_error(uint errc
>
>   bool select_create::send_eof()
>   {
> +  if (create_info->options&  HA_LEX_CREATE_TMP_TABLE)
> +    thd->transaction.stmt.created_temp_table();
> +
>     bool tmp=select_insert::send_eof();
>     if (tmp)
>       abort_result_set();
> @@ -4134,7 +4131,7 @@ void select_create::abort_result_set()
>     */
>     tmp_disable_binlog(thd);
>     select_insert::abort_result_set();
> -  thd->transaction.stmt.modified_non_trans_table= FALSE;
> +  thd->transaction.stmt.reset_unsafe_rollback_flags();
>     reenable_binlog(thd);
>     /* possible error of writing binary log is ignored deliberately */
>     (void) thd->binlog_flush_pending_rows_event(TRUE, TRUE);
>
> === modified file 'sql/sql_lex.h'
> --- a/sql/sql_lex.h	2010-11-10 11:26:45 +0000
> +++ b/sql/sql_lex.h	2010-12-04 11:15:37 +0000
> @@ -1425,24 +1425,6 @@ public:
>       DBUG_RETURN((stmt_accessed_table_flag&  (1U<<  accessed_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);
> -  }
> -
>     /*
>       Checks if a mixed statement is unsafe.
>
>
> === modified file 'sql/sql_load.cc'
> --- a/sql/sql_load.cc	2010-10-21 12:18:25 +0000
> +++ b/sql/sql_load.cc	2010-12-04 11:15:37 +0000
> @@ -568,7 +568,7 @@ int mysql_load(THD *thd,sql_exchange *ex
>
>             /* since there is already an error, the possible error of
>                writing binary log will be ignored */
> -	  if (thd->transaction.stmt.modified_non_trans_table)
> +	  if (thd->transaction.stmt.cannot_safe_rollback())
>               (void) write_execute_load_query_log_event(thd, ex,
>                                                         table_list->db,
>                                                         table_list->table_name,
> @@ -592,8 +592,6 @@ int mysql_load(THD *thd,sql_exchange *ex
>   	  (ulong) (info.records - info.copied),
>             (ulong) thd->warning_info->statement_warn_count());
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -    thd->transaction.all.modified_non_trans_table= TRUE;
>   #ifndef EMBEDDED_LIBRARY
>     if (mysql_bin_log.is_open())
>     {
> @@ -635,7 +633,7 @@ int mysql_load(THD *thd,sql_exchange *ex
>     my_ok(thd, info.copied + info.deleted, 0L, name);
>   err:
>     DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) ||
> -              thd->transaction.stmt.modified_non_trans_table);
> +              thd->transaction.stmt.cannot_safe_rollback());
>     table->file->ha_release_auto_increment();
>     table->auto_increment_field_not_null= FALSE;
>     thd->abort_on_warning= 0;
> @@ -1256,7 +1254,8 @@ read_xml_field(THD *thd, COPY_INFO&info
>         We don't need to reset auto-increment field since we are restoring
>         its default value at the beginning of each loop iteration.
>       */
> -    thd->transaction.stmt.modified_non_trans_table= no_trans_update_stmt;
> +    if (no_trans_update_stmt)
> +      thd->transaction.stmt.modified_non_trans_table();
>       thd->warning_info->inc_current_row_for_warning();
>       continue_loop:;
>     }
>
> === modified file 'sql/sql_parse.cc'
> --- a/sql/sql_parse.cc	2010-10-27 14:46:44 +0000
> +++ b/sql/sql_parse.cc	2010-12-04 11:15:37 +0000
> @@ -1981,7 +1981,7 @@ mysql_execute_command(THD *thd)
>
>     status_var_increment(thd->status_var.com_stat[lex->sql_command]);
>
> -  DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE);
> +  DBUG_ASSERT(thd->transaction.stmt.cannot_safe_rollback() == FALSE);
>
>     /*
>       End a active transaction so that this command will have it's
> @@ -2463,10 +2463,6 @@ case SQLCOM_PREPARE:
>           */
>           lex->unlink_first_table(&link_to_local);
>
> -        /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
> -        if (create_info.options&  HA_LEX_CREATE_TMP_TABLE)
> -          thd->variables.option_bits|= OPTION_KEEP_LOG;
> -
>           /*
>             select_create is currently not re-execution friendly and
>             needs to be created for every execution of a PS/SP.
> @@ -2492,9 +2488,6 @@ case SQLCOM_PREPARE:
>       }
>       else
>       {
> -      /* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
> -      if (create_info.options&  HA_LEX_CREATE_TMP_TABLE)
> -        thd->variables.option_bits|= OPTION_KEEP_LOG;
>         /* regular create */
>         if (create_info.options&  HA_LEX_CREATE_TABLE_LIKE)
>         {
> @@ -3015,11 +3008,6 @@ end_with_restore_list:
>         if (check_table_access(thd, DROP_ACL, all_tables, FALSE, UINT_MAX, FALSE))
>   	goto error;				/* purecov: inspected */
>       }
> -    else
> -    {
> -      /* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
> -      thd->variables.option_bits|= OPTION_KEEP_LOG;
> -    }
>       /* DDL and binlog write order are protected by metadata locks. */
>       res= mysql_rm_table(thd, first_table, lex->drop_if_exists,
>   			lex->drop_temporary);
> @@ -4378,6 +4366,8 @@ finish:
>     DBUG_ASSERT(!thd->in_active_multi_stmt_transaction() ||
>                  thd->in_multi_stmt_transaction_mode());
>
> +  THD::st_transactions&trans= thd->transaction;
> +  trans.all.add_unsafe_rollback_flags(trans.stmt.get_unsafe_rollback_flags());
>
>     if (! thd->in_sub_stmt)
>     {
> @@ -5248,15 +5238,9 @@ void THD::reset_for_next_command()
>       beginning of each SQL statement.
>     */
>     thd->server_status&= ~SERVER_STATUS_CLEAR_SET;
> -  /*
> -    If in autocommit mode and not in a transaction, reset
> -    OPTION_STATUS_NO_TRANS_UPDATE | OPTION_KEEP_LOG to not get warnings
> -    in ha_rollback_trans() about some tables couldn't be rolled back.
> -  */
>     if (!thd->in_multi_stmt_transaction_mode())
>     {
> -    thd->variables.option_bits&= ~OPTION_KEEP_LOG;
> -    thd->transaction.all.modified_non_trans_table= FALSE;
> +    thd->transaction.all.reset_unsafe_rollback_flags();
>     }
>     DBUG_ASSERT(thd->security_ctx==&thd->main_security_ctx);
>     thd->thread_specific_used= FALSE;
>
> === modified file 'sql/sql_priv.h'
> --- a/sql/sql_priv.h	2010-11-05 16:23:32 +0000
> +++ b/sql/sql_priv.h	2010-12-04 11:15:37 +0000
> @@ -101,7 +101,6 @@
>   #define OPTION_BEGIN            (1ULL<<  20)    // THD, intern
>   #define OPTION_TABLE_LOCK       (1ULL<<  21)    // THD, intern
>   #define OPTION_QUICK            (1ULL<<  22)    // SELECT (for DELETE)
> -#define OPTION_KEEP_LOG         (1ULL<<  23)    // THD, user
>
>   /* The following is used to detect a conflict with DISTINCT */
>   #define SELECT_ALL              (1ULL<<  24)    // SELECT, user, parser
>
> === modified file 'sql/sql_table.cc'
> --- a/sql/sql_table.cc	2010-11-11 09:40:06 +0000
> +++ b/sql/sql_table.cc	2010-12-04 11:15:37 +0000
> @@ -2244,6 +2244,14 @@ int mysql_rm_table_part2(THD *thd, TABLE
>         goto err;
>       }
>
> +    /*
> +      DROP TEMPORARY TABLE doesn't terminate a transaction. Calling
> +      stmt.dropped_temp_table() guarantees the transaction can be binlogged
> +      correctly.
> +    */
> +    if (!error&&  drop_temporary)
> +      thd->transaction.stmt.dropped_temp_table();
> +
>       if ((drop_temporary&&  if_exists) || !error)
>       {
>         /*
> @@ -4478,6 +4486,13 @@ bool mysql_create_table(THD *thd, TABLE_
>     result= mysql_create_table_no_lock(thd, create_table->db,
>                                        create_table->table_name, create_info,
>                                        alter_info, FALSE, 0,&is_trans);
> +  /*
> +    CREATE TEMPORARY TABLE doesn't terminate a transaction. Calling
> +    stmt.created_temp_table() guarantees the transaction can be binlogged
> +    correctly.
> +  */
> +  if (create_info->options&  HA_LEX_CREATE_TMP_TABLE)
> +    thd->transaction.stmt.created_temp_table();
>
>     /*
>       Don't write statement if:
> @@ -4710,6 +4725,14 @@ bool mysql_create_like_table(THD* thd, T
>                                                table->table_name,
>                                                MDL_EXCLUSIVE));
>     /*
> +    CREATE TEMPORARY TABLE doesn't terminate a transaction. Calling
> +    stmt.created_temp_table() guarantees the transaction can be binlogged
> +    correctly.
> +  */
> +  if (create_info->options&  HA_LEX_CREATE_TMP_TABLE)
> +    thd->transaction.stmt.created_temp_table();
> +
> +  /*
>       We have to write the query before we unlock the tables.
>     */
>     if (thd->is_current_stmt_binlog_format_row())
>
> === modified file 'sql/sql_truncate.cc'
> --- a/sql/sql_truncate.cc	2010-10-21 11:34:17 +0000
> +++ b/sql/sql_truncate.cc	2010-12-04 11:15:37 +0000
> @@ -415,7 +415,7 @@ bool Sql_cmd_truncate_table::truncate_ta
>         if ((error= recreate_temporary_table(thd, table)))
>           binlog_stmt= FALSE; /* No need to binlog failed truncate-by-recreate. */
>
> -      DBUG_ASSERT(! thd->transaction.stmt.modified_non_trans_table);
> +      DBUG_ASSERT(! thd->transaction.stmt.cannot_safe_rollback());
>       }
>       else
>       {
>
> === modified file 'sql/sql_update.cc'
> --- a/sql/sql_update.cc	2010-11-16 00:21:26 +0000
> +++ b/sql/sql_update.cc	2010-12-04 11:15:37 +0000
> @@ -834,7 +834,7 @@ int mysql_update(THD *thd,
>     table->file->try_semi_consistent_read(0);
>
>     if (!transactional_table&&  updated>  0)
> -    thd->transaction.stmt.modified_non_trans_table= TRUE;
> +    thd->transaction.stmt.modified_non_trans_table();
>
>     end_read_record(&info);
>     delete select;
> @@ -850,9 +850,6 @@ int mysql_update(THD *thd,
>       query_cache_invalidate3(thd, table_list, 1);
>     }
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -      thd->transaction.all.modified_non_trans_table= TRUE;
> -
>     /*
>       error<  0 means really no error at all: we processed all rows until the
>       last one without error. error>  0 means an error (e.g. unique key
> @@ -862,7 +859,7 @@ int mysql_update(THD *thd,
>       Sometimes we want to binlog even if we updated no rows, in case user used
>       it to be sure master and slave are in same state.
>     */
> -  if ((error<  0) || thd->transaction.stmt.modified_non_trans_table)
> +  if ((error<  0) || thd->transaction.stmt.cannot_safe_rollback())
>     {
>       if (mysql_bin_log.is_open())
>       {
> @@ -880,7 +877,8 @@ int mysql_update(THD *thd,
>         }
>       }
>     }
> -  DBUG_ASSERT(transactional_table || !updated ||
> thd->transaction.stmt.modified_non_trans_table);
> +  DBUG_ASSERT(transactional_table || !updated ||
> +              thd->transaction.stmt.cannot_safe_rollback());
>     free_underlaid_joins(thd, select_lex);
>
>     /* If LAST_INSERT_ID(X) was used, report X */
> @@ -1663,7 +1661,7 @@ multi_update::~multi_update()
>       delete [] copy_field;
>     thd->count_cuted_fields= CHECK_FIELD_IGNORE;		// Restore this setting
>     DBUG_ASSERT(trans_safe || !updated ||
> -              thd->transaction.all.modified_non_trans_table);
> +              thd->transaction.stmt.cannot_safe_rollback());
>   }
>
>
> @@ -1764,7 +1762,7 @@ bool multi_update::send_data(List<Item>
>             else
>             {
>               trans_safe= FALSE;
> -            thd->transaction.stmt.modified_non_trans_table= TRUE;
> +            thd->transaction.stmt.modified_non_trans_table();
>             }
>           }
>         }
> @@ -1835,7 +1833,7 @@ void multi_update::abort_result_set()
>   {
>     /* the error was handled or nothing deleted and no side effects return */
>     if (error_handled ||
> -      (!thd->transaction.stmt.modified_non_trans_table&&  !updated))
> +      (!thd->transaction.stmt.cannot_safe_rollback()&&  !updated))
>       return;
>
>     /* Something already updated so we have to invalidate cache */
> @@ -1848,7 +1846,7 @@ void multi_update::abort_result_set()
>
>     if (! trans_safe)
>     {
> -    DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table);
> +    DBUG_ASSERT(thd->transaction.stmt.cannot_safe_rollback());
>       if (do_update&&  table_count>  1)
>       {
>         /* Add warning here */
> @@ -1859,7 +1857,7 @@ void multi_update::abort_result_set()
>         (void) do_updates();
>       }
>     }
> -  if (thd->transaction.stmt.modified_non_trans_table)
> +  if (thd->transaction.stmt.cannot_safe_rollback())
>     {
>       /*
>         The query has to binlog because there's a modified non-transactional table
> @@ -1878,9 +1876,9 @@ void multi_update::abort_result_set()
>                           thd->query(), thd->query_length(),
>                           transactional_tables, FALSE, FALSE, errcode);
>       }
> -    thd->transaction.all.modified_non_trans_table= TRUE;
> +    thd->transaction.all.modified_non_trans_table();
>     }
> -  DBUG_ASSERT(trans_safe || !updated ||
> thd->transaction.stmt.modified_non_trans_table);
> +  DBUG_ASSERT(trans_safe || !updated ||
> thd->transaction.stmt.cannot_safe_rollback());
>   }
>
>
> @@ -2012,7 +2010,7 @@ int multi_update::do_updates()
>         else
>         {
>           trans_safe= FALSE;				// Can't do safe rollback
> -        thd->transaction.stmt.modified_non_trans_table= TRUE;
> +        thd->transaction.stmt.modified_non_trans_table();
>         }
>       }
>       (void) table->file->ha_rnd_end();
> @@ -2044,7 +2042,7 @@ err2:
>       else
>       {
>         trans_safe= FALSE;
> -      thd->transaction.stmt.modified_non_trans_table= TRUE;
> +      thd->transaction.stmt.modified_non_trans_table();
>       }
>     }
>     DBUG_RETURN(1);
> @@ -2091,10 +2089,7 @@ bool multi_update::send_eof()
>       either from the query's list or via a stored routine: bug#13270,23333
>     */
>
> -  if (thd->transaction.stmt.modified_non_trans_table)
> -    thd->transaction.all.modified_non_trans_table= TRUE;
> -
> -  if (local_error == 0 || thd->transaction.stmt.modified_non_trans_table)
> +  if (local_error == 0 || thd->transaction.stmt.cannot_safe_rollback())
>     {
>       if (mysql_bin_log.is_open())
>       {
> @@ -2112,7 +2107,7 @@ bool multi_update::send_eof()
>       }
>     }
>     DBUG_ASSERT(trans_safe || !updated ||
> -              thd->transaction.stmt.modified_non_trans_table);
> +              thd->transaction.stmt.cannot_safe_rollback());
>
>     if (local_error != 0)
>       error_handled= TRUE; // to force early leave from ::send_error()
>
> === modified file 'sql/sys_vars.cc'
> --- a/sql/sys_vars.cc	2010-11-16 09:38:43 +0000
> +++ b/sql/sys_vars.cc	2010-12-04 11:15:37 +0000
> @@ -2260,8 +2260,8 @@ static bool fix_autocommit(sys_var *self
>         transaction implicitly at the end (@sa stmt_causes_implicitcommit()).
>       */
>       thd->variables.option_bits&=
> -                 ~(OPTION_BEGIN | OPTION_KEEP_LOG | OPTION_NOT_AUTOCOMMIT);
> -    thd->transaction.all.modified_non_trans_table= false;
> +                 ~(OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
> +    thd->transaction.all.reset_unsafe_rollback_flags();
>       thd->server_status|= SERVER_STATUS_AUTOCOMMIT;
>       return false;
>     }
> @@ -2270,7 +2270,7 @@ static bool fix_autocommit(sys_var *self
>         !(thd->variables.option_bits&  OPTION_NOT_AUTOCOMMIT))
>     { // disabling autocommit
>
> -    thd->transaction.all.modified_non_trans_table= false;
> +    thd->transaction.all.reset_unsafe_rollback_flags();
>       thd->server_status&= ~SERVER_STATUS_AUTOCOMMIT;
>       thd->variables.option_bits|= OPTION_NOT_AUTOCOMMIT;
>       return false;
>
> === modified file 'sql/transaction.cc'
> --- a/sql/transaction.cc	2010-10-01 10:23:16 +0000
> +++ b/sql/transaction.cc	2010-12-04 11:15:37 +0000
> @@ -110,8 +110,8 @@ bool trans_begin(THD *thd, uint flags)
>       res= test(ha_commit_trans(thd, TRUE));
>     }
>
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>
>     if (res)
>       DBUG_RETURN(TRUE);
> @@ -159,8 +159,8 @@ bool trans_commit(THD *thd)
>       RUN_HOOK(transaction, after_rollback, (thd, FALSE));
>     else
>       RUN_HOOK(transaction, after_commit, (thd, FALSE));
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>     thd->lex->start_transaction_opt= 0;
>
>     DBUG_RETURN(test(res));
> @@ -196,8 +196,8 @@ bool trans_commit_implicit(THD *thd)
>       res= test(ha_commit_trans(thd, TRUE));
>     }
>
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>
>     /*
>       Upon implicit commit, reset the current transaction
> @@ -231,8 +231,8 @@ bool trans_rollback(THD *thd)
>     thd->server_status&= ~SERVER_STATUS_IN_TRANS;
>     res= ha_rollback_trans(thd, TRUE);
>     RUN_HOOK(transaction, after_rollback, (thd, FALSE));
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>     thd->lex->start_transaction_opt= 0;
>
>     DBUG_RETURN(test(res));
> @@ -436,12 +436,8 @@ bool trans_rollback_to_savepoint(THD *th
>
>     if (ha_rollback_to_savepoint(thd, sv))
>       res= TRUE;
> -  else if (((thd->variables.option_bits&  OPTION_KEEP_LOG) ||
> -            thd->transaction.all.modified_non_trans_table)&&
> -           !thd->slave_thread)
> -    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
> -                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
> -                 ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
> +  else if (thd->transaction.all.cannot_safe_rollback()&& 
> !thd->slave_thread)
> +    thd->transaction.push_unsafe_rollback_warnings(thd);
>
>     thd->transaction.savepoints= sv;
>
> @@ -664,8 +660,8 @@ bool trans_xa_commit(THD *thd)
>       DBUG_RETURN(TRUE);
>     }
>
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>     thd->server_status&= ~SERVER_STATUS_IN_TRANS;
>     xid_cache_delete(&thd->transaction.xid_state);
>     thd->transaction.xid_state.xa_state= XA_NOTR;
> @@ -719,8 +715,8 @@ bool trans_xa_rollback(THD *thd)
>     if ((res= test(ha_rollback_trans(thd, TRUE))))
>       my_error(ER_XAER_RMERR, MYF(0));
>
> -  thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
> -  thd->transaction.all.modified_non_trans_table= FALSE;
> +  thd->variables.option_bits&= ~OPTION_BEGIN;
> +  thd->transaction.all.reset_unsafe_rollback_flags();
>     thd->server_status&= ~SERVER_STATUS_IN_TRANS;
>     xid_cache_delete(&thd->transaction.xid_state);
>     thd->transaction.xid_state.xa_state= XA_NOTR;
>
>
>
>
>

Thread
bzr commit into mysql-trunk branch (Li-Bing.Song:3350) Bug#55798 Bug#56184Li-Bing.Song4 Dec
  • Re: bzr commit into mysql-trunk branch (Li-Bing.Song:3350) Bug#55798Bug#56184Alfranio Correia7 Dec
    • Re: bzr commit into mysql-trunk branch (Li-Bing.Song:3350) Bug#55798Bug#56184Libing Song9 Dec