List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:December 17 2008 9:07pm
Subject:bzr commit into mysql-5.1 branch (mats:2771) Bug#39934
View as plain text  
#At file:///home/bzr/bugs/b39934-5.1-5.1.29-rc/ based on revid:gshchepa@stripped-c4lu3fjm3c2o1qdp

 2771 Mats Kindahl	2008-12-17
      Bug#39934: Slave stops for engine that only support row-based logging
      
      It was possible to get a row-based event in the binary log on the slave
      even if the slave is running in STATEMENT mode. 
      
      This patch clarifies the rules for what format the slave can log in and
      under what circumstances as well as adding some missing error messages
      and clarifying some other.
added:
  mysql-test/suite/rpl/r/rpl_mix_found_rows.result
  mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result
  mysql-test/suite/rpl/r/rpl_mix_truncate_2myisam.result
  mysql-test/suite/rpl/r/rpl_mix_truncate_3innodb.result
  mysql-test/suite/rpl/r/rpl_stm_truncate_2myisam.result
  mysql-test/suite/rpl/r/rpl_stm_truncate_3innodb.result
  mysql-test/suite/rpl/t/rpl_mix_found_rows.test
  mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test
  mysql-test/suite/rpl/t/rpl_mix_truncate_2myisam.test
  mysql-test/suite/rpl/t/rpl_mix_truncate_3innodb.test
  mysql-test/suite/rpl/t/rpl_stm_truncate_2myisam.test
  mysql-test/suite/rpl/t/rpl_stm_truncate_3innodb.test
  mysql-test/suite/rpl_ndb/combinations
renamed:
  mysql-test/suite/rpl/r/rpl_found_rows.result => mysql-test/suite/rpl/r/rpl_stm_found_rows.result
  mysql-test/suite/rpl/r/rpl_truncate_2myisam.result => mysql-test/suite/rpl/r/rpl_row_truncate_2myisam.result
  mysql-test/suite/rpl/r/rpl_truncate_3innodb.result => mysql-test/suite/rpl/r/rpl_row_truncate_3innodb.result
  mysql-test/suite/rpl/t/rpl_found_rows.test => mysql-test/suite/rpl/t/rpl_stm_found_rows.test
  mysql-test/suite/rpl/t/rpl_truncate_2myisam.test => mysql-test/suite/rpl/t/rpl_row_truncate_2myisam.test
  mysql-test/suite/rpl/t/rpl_truncate_3innodb.test => mysql-test/suite/rpl/t/rpl_row_truncate_3innodb.test
modified:
  mysql-test/extra/rpl_tests/rpl_foreign_key.test
  mysql-test/extra/rpl_tests/rpl_insert_delayed.test
  mysql-test/extra/rpl_tests/rpl_truncate.test
  mysql-test/extra/rpl_tests/rpl_truncate_helper.test
  mysql-test/include/rpl_udf.inc
  mysql-test/lib/mtr_report.pl
  mysql-test/suite/binlog/r/binlog_multi_engine.result
  mysql-test/suite/binlog/r/binlog_stm_ps.result
  mysql-test/suite/binlog/r/binlog_unsafe.result
  mysql-test/suite/binlog/t/binlog_multi_engine.test
  mysql-test/suite/rpl/r/rpl_events.result
  mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
  mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
  mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result
  mysql-test/suite/rpl/r/rpl_idempotency.result
  mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
  mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
  mysql-test/suite/rpl/r/rpl_skip_error.result
  mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
  mysql-test/suite/rpl/r/rpl_temporary_errors.result
  mysql-test/suite/rpl/r/rpl_udf.result
  mysql-test/suite/rpl/t/rpl_bug31076.test
  mysql-test/suite/rpl/t/rpl_events.test
  mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
  mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
  mysql-test/suite/rpl/t/rpl_idempotency.test
  mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
  mysql-test/suite/rpl/t/rpl_row_max_relay_size.test
  mysql-test/suite/rpl/t/rpl_slave_skip.test
  mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test
  mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
  mysql-test/suite/rpl/t/rpl_temporary_errors.test
  mysql-test/suite/rpl/t/rpl_udf.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test
  sql/log_event.cc
  sql/share/errmsg.txt
  sql/sql_base.cc
  sql/sql_class.cc
  sql/sql_class.h
  sql/sql_lex.h
  mysql-test/suite/rpl/r/rpl_stm_found_rows.result
  mysql-test/suite/rpl/r/rpl_row_truncate_2myisam.result
  mysql-test/suite/rpl/r/rpl_row_truncate_3innodb.result
  mysql-test/suite/rpl/t/rpl_stm_found_rows.test
  mysql-test/suite/rpl/t/rpl_row_truncate_2myisam.test
  mysql-test/suite/rpl/t/rpl_row_truncate_3innodb.test

per-file messages:
  mysql-test/extra/rpl_tests/rpl_foreign_key.test
    Removing explicit set of row format.
  mysql-test/extra/rpl_tests/rpl_insert_delayed.test
    Adding code to filter out table id from table map events in binlog listing.
  mysql-test/extra/rpl_tests/rpl_truncate.test
    Test now only test one binlog format instead of all three.
  mysql-test/extra/rpl_tests/rpl_truncate_helper.test
    Removing explicit set of binlog format. It is possible to check the
    behaviour entirely using results on master and slave, so the binlog
    listing causing difference in result file between binlog formats is
    redundant and therefore removed.
  mysql-test/include/rpl_udf.inc
    Disabling warnings over code that generates warnings
    for some binlog formats causing inconsistencies in
    the result file.
  mysql-test/lib/mtr_report.pl
    Filtering out harmless warnings for tests that issue
    such statement deliberately.
  mysql-test/suite/binlog/t/binlog_multi_engine.test
    Changing test to reflect new, more specific, error codes.
  mysql-test/suite/rpl/t/rpl_bug31076.test
    Test only valid for mixed and row mode since it generates
    row events.
  mysql-test/suite/rpl/t/rpl_events.test
    Removing explicit set of binlog format and removing duplicate testing
    instead relying on the test system to try all binlog formats.
  mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
    Removing triplicate testing and instead relying on test system.
    Test only relevant for row format since statement-based replication
    cannot handle extra columns on master.
  mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
    Removing triplicate testing and instead relying on test system.
    Test only relevant for row format since statement-based replication
    cannot handle extra columns on master.
  mysql-test/suite/rpl/t/rpl_idempotency.test
    Adding test code to set the binlog format of the slave SQL thread,
    previously causing slave to stop when executed with binlog_format
    being STATEMENT.
  mysql-test/suite/rpl/t/rpl_mix_found_rows.test
    Splitting rpl_found_rows into separate tests for different
    values of binlog_format.
  mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test
    Creating separate test cases of rpl_insert_delayed for the
    different binlog_format values.
  mysql-test/suite/rpl/t/rpl_mix_truncate_2myisam.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_mix_truncate_3innodb.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
    Test change since slave does not switch to row format
    in STATEMENT mode any more.
  mysql-test/suite/rpl/t/rpl_row_max_relay_size.test
    Test was setting row format explicitly, so test was changed to
    only execute under ROW mode.
  mysql-test/suite/rpl/t/rpl_row_truncate_2myisam.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_row_truncate_3innodb.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_slave_skip.test
    Test switches mode internally and master generates both row and statement
    events, requiring slave to be able to switch format. Hence test was changed
    to only execute under mixed mode.
  mysql-test/suite/rpl/t/rpl_stm_found_rows.test
    Splitting rpl_found_rows into separate tests for different
    values of binlog_format.
  mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test
    Creating separate test cases of rpl_insert_delayed for the
    different binlog_format values.
  mysql-test/suite/rpl/t/rpl_stm_truncate_2myisam.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_stm_truncate_3innodb.test
    Creating separate versions of rpl_truncate_*.test files for values of binlog_format.
  mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test
    Test switches mode internally and master generates both row and statement
    events, requiring slave to be able to switch format. Hence test was changed
    to only execute under mixed and row mode.
  mysql-test/suite/rpl/t/rpl_temporary_errors.test
    Removing explicit set of binlog_format to ROW and changing test
    to only execute under ROW mode.
  mysql-test/suite/rpl/t/rpl_udf.test
    Removing triplicate testing and instead relying on test system
    to execute test under all alternative values of binlog_format.
  mysql-test/suite/rpl_ndb/combinations
    Adding combinations file to rpl_ndb test suite.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test
    Test requires slave to be able to switch to row mode, so test was
    changed to only execute under mixed and row mode.
  sql/log_event.cc
    Removing code to switch to row format when in statement mode.
    Adding code to mark statement executing Rows_log_event as a
    row injection.
  sql/share/errmsg.txt
    Adding more exact error messages for the various cases when
    binlogging is prevented due to semantics of statement.
  sql/sql_base.cc
    Changing logic and adding more informative error messages when logging
    is not possible. Moving code to switch to row format for a row injection
    here (it was in log_event.cc before, but now all switching to row format
    is here).
  sql/sql_class.cc
    Doxygenifying comment to THD::binlog_query() and adding code to print
    warnings when unsafe statements are logged as statements because either
    the binlog format is STATEMENT or the engines are not capable of row-
    based logging.
  sql/sql_class.h
    Adding THD::m_flags_all_set field with getter and setter to be able to
    communicate table flag set from decide_logging_format() to binlog_query().
  sql/sql_lex.h
    Adding flags and functions to mark a statement as a row injection.
=== modified file 'mysql-test/extra/rpl_tests/rpl_foreign_key.test'
--- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test	2007-12-12 10:14:59 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_foreign_key.test	2008-12-17 21:07:09 +0000
@@ -47,7 +47,6 @@ insert into t1 set b=1;
 insert into t2 set a=1, b=1;
 
 set foreign_key_checks=0;
-set @@session.binlog_format=row;
 delete from t1;
 
 --echo must sync w/o a problem (could not with the buggy code)

=== modified file 'mysql-test/extra/rpl_tests/rpl_insert_delayed.test'
--- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test	2007-07-27 14:29:48 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test	2008-12-17 21:07:09 +0000
@@ -108,6 +108,7 @@ if  (`SELECT @@global.binlog_format != '
 {
   #must show two INSERT DELAYED
   --replace_column 1 x 2 x 3 x 4 x 5 x
+  --replace_regex /table_id: [0-9]+/table_id: #/
   show binlog events in 'master-bin.000002' LIMIT 2,2;
 }
 select * from t1;
@@ -118,6 +119,7 @@ if  (`SELECT @@global.binlog_format != '
 {
   #must show two INSERT DELAYED
   --replace_column 1 x 2 x 3 x 4 x 5 x
+  --replace_regex /table_id: [0-9]+/table_id: #/
   show binlog events in 'slave-bin.000002' LIMIT 2,2;
 }
 select * from t1;

=== modified file 'mysql-test/extra/rpl_tests/rpl_truncate.test'
--- a/mysql-test/extra/rpl_tests/rpl_truncate.test	2006-12-07 14:18:35 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_truncate.test	2008-12-17 21:07:09 +0000
@@ -9,27 +9,9 @@
 
 --source include/master-slave.inc
 
-let $format = STATEMENT;
 let $stmt   = TRUNCATE TABLE;
 --source extra/rpl_tests/rpl_truncate_helper.test
 
-let $format = MIXED;
-let $stmt   = TRUNCATE TABLE;
---source extra/rpl_tests/rpl_truncate_helper.test
-
-let $format = ROW;
-let $stmt   = TRUNCATE TABLE;
---source extra/rpl_tests/rpl_truncate_helper.test
-
-let $format = STATEMENT;
-let $stmt   = DELETE FROM;
---source extra/rpl_tests/rpl_truncate_helper.test
-
-let $format = MIXED;
-let $stmt   = DELETE FROM;
---source extra/rpl_tests/rpl_truncate_helper.test
-
-let $format = ROW;
 let $stmt   = DELETE FROM;
 --source extra/rpl_tests/rpl_truncate_helper.test
 

=== modified file 'mysql-test/extra/rpl_tests/rpl_truncate_helper.test'
--- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test	2007-11-02 12:00:38 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test	2008-12-17 21:07:09 +0000
@@ -14,9 +14,6 @@ START SLAVE;
 
 --echo **** On Master ****
 connection master;
-eval SET SESSION BINLOG_FORMAT=$format;
-eval SET GLOBAL  BINLOG_FORMAT=$format;
-
 eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
 INSERT INTO t1 VALUES (1,1), (2,2);
 SELECT * FROM t1;
@@ -35,8 +32,6 @@ SELECT * FROM t1;
 --echo **** On Master ****
 connection master;
 DROP TABLE t1;
-let $SERVER_VERSION=`select version()`;
-source include/show_binlog_events.inc;
 
 connection master;
 RESET MASTER;

=== modified file 'mysql-test/include/rpl_udf.inc'
--- a/mysql-test/include/rpl_udf.inc	2007-08-29 21:36:08 +0000
+++ b/mysql-test/include/rpl_udf.inc	2008-12-17 21:07:09 +0000
@@ -55,11 +55,13 @@ connection master;
 --echo "Running on the master"
 --enable_info
 eval CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=$engine_type;
+--disable_warnings
 INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
 INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
 INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
 INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
 SELECT * FROM t1 ORDER BY sum;
+--enable_warnings
 --disable_info
 
 sync_slave_with_master;

=== modified file 'mysql-test/lib/mtr_report.pl'
--- a/mysql-test/lib/mtr_report.pl	2008-10-02 07:46:14 +0000
+++ b/mysql-test/lib/mtr_report.pl	2008-12-17 21:07:09 +0000
@@ -382,6 +382,19 @@ sub mtr_report_stats ($) {
                   /Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452/
 		 )) or
 
+                # These tests generate warnings since they write
+                # unsafe statements to the binary log
+                (($testname eq 'rpl.rpl_udf' or
+                  $testname eq 'rpl.rpl_user_variables' or
+                  $testname eq 'rpl.rpl_invoked_features' or
+                  $testname eq 'binlog.binlog_statement_insert_delayed' or
+                  $testname eq 'binlog.binlog_stm_blackhole' or
+                  $testname eq 'binlog.binlog_stm_ps' or
+                  $testname eq 'binlog.binlog_unsafe' or
+                  $testname eq 'rpl.rpl_stm_insert_delayed') and
+                  /Unsafe statement binlogged as statement/
+                ) or
+
 		# These tests does "kill" on queries, causing sporadic errors when writing to logs
 		(($testname eq 'rpl.rpl_skip_error' or
 		  $testname eq 'rpl.rpl_err_ignoredtable' or

=== modified file 'mysql-test/suite/binlog/r/binlog_multi_engine.result'
--- a/mysql-test/suite/binlog/r/binlog_multi_engine.result	2008-10-02 09:02:38 +0000
+++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result	2008-12-17 21:07:09 +0000
@@ -42,7 +42,7 @@ INSERT INTO t1m VALUES (1,1), (1,2), (2,
 INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
 UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
 UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
-ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
+ERROR HY000: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
 TRUNCATE t1m;
 TRUNCATE t1b;
 TRUNCATE t1n;
@@ -68,9 +68,9 @@ INSERT INTO t1m VALUES (1,1), (1,2), (2,
 INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
 INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
 UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
-ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
+ERROR HY000: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
 UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
-ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
+ERROR HY000: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	use `test`; BEGIN

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_ps.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_ps.result	2008-03-25 13:28:12 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_ps.result	2008-12-17 21:07:09 +0000
@@ -11,7 +11,7 @@ prepare s from "insert into t1 select 10
 set @a=100;
 execute s using @a;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	#	#	use `test`; create table t1 (a int)

=== modified file 'mysql-test/suite/binlog/r/binlog_unsafe.result'
--- a/mysql-test/suite/binlog/r/binlog_unsafe.result	2008-03-26 09:56:03 +0000
+++ b/mysql-test/suite/binlog/r/binlog_unsafe.result	2008-12-17 21:07:09 +0000
@@ -10,25 +10,25 @@ INSERT DELAYED INTO t1 VALUES (5);
 ---- Insert directly ----
 INSERT INTO t1 VALUES (@@global.sync_binlog);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t1 VALUES (@@session.insert_id);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t1 VALUES (@@global.auto_increment_increment);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t2 SELECT UUID();
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t2 VALUES (@@session.sql_mode);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t2 VALUES (@@global.init_slave);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 INSERT INTO t2 VALUES (@@hostname);
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 ---- Insert from stored procedure ----
 CREATE PROCEDURE proc()
 BEGIN
@@ -42,13 +42,13 @@ INSERT INTO t2 VALUES (@@hostname);
 END|
 CALL proc();
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
 ---- Insert from stored function ----
 CREATE FUNCTION func()
 RETURNS INT
@@ -66,13 +66,13 @@ SELECT func();
 func()
 0
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
 ---- Insert from trigger ----
 CREATE TRIGGER trig
 BEFORE INSERT ON trigger_table
@@ -88,14 +88,14 @@ INSERT INTO t2 VALUES (@@hostname);
 END|
 INSERT INTO trigger_table VALUES ('bye.');
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
 ---- Insert from prepared statement ----
 PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)';
 PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
@@ -106,25 +106,25 @@ PREPARE p6 FROM 'INSERT INTO t2 VALUES (
 PREPARE p7 FROM 'INSERT INTO t2 VALUES (@@hostname)';
 EXECUTE p1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p2;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p3;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p4;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p5;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p6;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 EXECUTE p7;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 ---- Insert from nested call of triggers / functions / procedures ----
 CREATE PROCEDURE proc1()
 INSERT INTO trigger_table VALUES ('ha!')|
@@ -154,13 +154,13 @@ EXECUTE prep6;
 func5()
 0
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
 ==== Variables that should *not* be unsafe ====
 INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
 INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
@@ -195,16 +195,16 @@ DROP TABLE t1, t2, t3, trigger_table, tr
 CREATE TABLE t1(a INT, b INT, KEY(a), PRIMARY KEY(b));
 INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 REPLACE INTO t1 SELECT * FROM t1 LIMIT 1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 UPDATE t1 SET a=1 LIMIT 1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 DELETE FROM t1 LIMIT 1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 CREATE PROCEDURE p1()
 BEGIN
 INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
@@ -214,9 +214,9 @@ DELETE FROM t1 LIMIT 1;
 END|
 CALL p1();
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
+Warning	1592	Unsafe statement binlogged as statement.
 DROP PROCEDURE p1;
 DROP TABLE t1;

=== modified file 'mysql-test/suite/binlog/t/binlog_multi_engine.test'
--- a/mysql-test/suite/binlog/t/binlog_multi_engine.test	2008-10-02 09:02:38 +0000
+++ b/mysql-test/suite/binlog/t/binlog_multi_engine.test	2008-12-17 21:07:09 +0000
@@ -60,7 +60,7 @@ let $wait_binlog_event= COMMIT;
 source include/wait_for_binlog_event.inc;
 
 UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
-error ER_BINLOG_LOGGING_IMPOSSIBLE;
+error ER_BINLOG_ENGINE_SELF_LOGGING;
 UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
 
 # Not possible to test this since NDB writes its own binlog, which
@@ -84,7 +84,7 @@ INSERT INTO t1m VALUES (1,1), (1,2), (2,
 INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
 INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
 
-error ER_BINLOG_LOGGING_IMPOSSIBLE;
+error ER_BINLOG_ENGINE_SELF_LOGGING;
 UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
 
 # Not possible to test this since NDB writes its own binlog, which
@@ -93,7 +93,7 @@ UPDATE t1m, t1n SET m = 2, e = 3 WHERE n
 
 #UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
 
-error ER_BINLOG_LOGGING_IMPOSSIBLE;
+error ER_BINLOG_ENGINE_SELF_LOGGING;
 UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
 
 source include/show_binlog_events.inc;

=== modified file 'mysql-test/suite/rpl/r/rpl_events.result'
--- a/mysql-test/suite/rpl/r/rpl_events.result	2008-04-30 18:41:50 +0000
+++ b/mysql-test/suite/rpl/r/rpl_events.result	2008-12-17 21:07:09 +0000
@@ -5,96 +5,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-set binlog_format=row;
-DROP EVENT IF EXISTS test.justonce;
-drop table if exists t1,t2;
-CREATE TABLE `t1` (
-`id` INT(10) UNSIGNED NOT NULL,
-`c` VARCHAR(50) NOT NULL,
-`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-INSERT INTO t1 (id, c) VALUES (1, 'manually');
-"Creating event test.justonce on the master"
-CREATE EVENT test.justonce ON SCHEDULE EVERY 2 SECOND DO 
-INSERT IGNORE INTO t1 (id, c) VALUES (2, 'from justonce');
-"Checking event is active on master"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce';
-db	name	status	originator
-test	justonce	ENABLED	1
-"Checking event data on the master"
-ONE
-1
-"Checking event data on the slave"
-ZERO
-0
-"Checking event is inactive on slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce';
-db	name	status	originator
-test	justonce	SLAVESIDE_DISABLED	1
-"Dropping event test.slave_once on the slave"
-DROP EVENT IF EXISTS test.slave_once;
-CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO 
-INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
-"Checking event status on the slave for originator value = slave's server_id"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
-db	name	status	originator
-test	slave_once	ENABLED	2
-"Dropping event test.slave_once on the slave"
-DROP EVENT IF EXISTS test.slave_once;
-"Dropping event test.justonce on the master"
-DROP EVENT IF EXISTS test.justonce;
-"Creating event test.er on the master"
-CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO 
-INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
-"Checking event status on the master"
-SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
-db	name	status	originator	body
-test	er	ENABLED	1	INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
-"Checking event status on the slave"
-SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
-db	name	status	originator	body
-test	er	SLAVESIDE_DISABLED	1	INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
-"Altering event test.er on the master"
-ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO 
-INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
-"Checking event status on the master"
-SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
-db	name	status	originator	body
-test	er	ENABLED	1	INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er')
-"Checking event status on the slave"
-SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
-db	name	status	originator	body
-test	er	SLAVESIDE_DISABLED	1	INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er')
-"Dropping event test.er on the master"
-DROP EVENT test.er;
-"Checking event status on the master"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
-db	name	status	originator
-"Checking event status on the slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
-db	name	status	originator
-"Creating event test.slave_terminate on the slave"
-CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DO 
-INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
-"Checking event status on the slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
-db	name	status	originator
-test	slave_terminate	ENABLED	2
-"Dropping event test.slave_terminate on the slave"
-DROP EVENT test.slave_terminate;
-"Creating event test.slave_terminate with DISABLE ON SLAVE on the slave"
-CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO 
-INSERT IGNORE INTO t1(c) VALUES (7, 'from slave_terminate');
-"Checking event status on the slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
-db	name	status	originator
-test	slave_terminate	SLAVESIDE_DISABLED	2
-"Dropping event test.slave_terminate on the slave"
-DROP EVENT test.slave_terminate;
-"Cleanup"
-DROP TABLE t1;
-set binlog_format=statement;
 DROP EVENT IF EXISTS test.justonce;
 drop table if exists t1,t2;
 CREATE TABLE `t1` (

=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result	2008-01-11 17:39:45 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result	2008-12-17 21:07:09 +0000
@@ -4,7 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-set binlog_format=row;
 
 ***********************************************************
 ***********************************************************
@@ -1143,2281 +1142,3 @@ c1	hex(c4)	c5
 3	6231623162316231	QA
 DROP TABLE t5;
 
-set binlog_format=statement;
-
-***********************************************************
-***********************************************************
-***************** Start of Testing ************************
-***********************************************************
-***********************************************************
-* This test format == binlog_format	STATEMENT and engine == 'InnoDB'
-***********************************************************
-***********************************************************
-
-***** Testing more columns on the Master *****
-
-CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 FLOAT DEFAULT '2.00', 
-f6 CHAR(4) DEFAULT 'TEST',
-f7 INT DEFAULT '0',
-f8 TEXT,
-f9 LONGBLOB,
-f10 BIT(63),
-f11 VARBINARY(64))ENGINE='InnoDB';
-
-* Alter Table on Slave and drop columns f5 through f11 *
-
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-
-* Insert data in Master then update and delete some rows*
-
-* Select count and 20 rows from Master *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
-hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(f11)
-2	2	2	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-3	3	3	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-5	5	5	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-6	6	6	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-8	8	8	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-9	9	9	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-11	11	11	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-12	12	12	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-14	14	14	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-15	15	15	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-17	17	17	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-18	18	18	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-20	20	20	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-21	21	21	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-23	23	23	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-24	24	24	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-26	26	26	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-
-* Select count and 20 rows from Slave *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT * FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-
-***** Testing Altering table def scenario *****
-
-CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f7 DECIMAL(17,9) default '1000.00',
-f8 MEDIUMBLOB,
-f9 NUMERIC(6,4) default '2000.00',
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='InnoDB';
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-
-CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f8 MEDIUMBLOB,
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='InnoDB';
-
-CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 DECIMAL(17,9) default '1000.00',
-f7 MEDIUMBLOB,
-f8 NUMERIC(6,4) default '2000.00',
-f9 VARCHAR(1024),
-f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f11 CHAR(255))
-ENGINE='InnoDB';
-Warnings:
-Warning	1264	Out of range value for column 'f8' at row 1
-
-CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5  BIGINT,
-f6  BLOB,
-f7  DATE,
-f8  DATETIME,
-f9  FLOAT,
-f10 INT,
-f11 LONGBLOB,
-f12 LONGTEXT,
-f13 MEDIUMBLOB,
-f14 MEDIUMINT,
-f15 MEDIUMTEXT,
-f16 REAL,
-f17 SMALLINT,
-f18 TEXT,
-f19 TIME,
-f20 TIMESTAMP,
-f21 TINYBLOB,
-f22 TINYINT,
-f23 TINYTEXT,
-f24 YEAR,
-f25 BINARY(255),
-f26 BIT(64),
-f27 CHAR(255),
-f28 DECIMAL(30,7),
-f29 DOUBLE,
-f30 ENUM ('a','b', 'c') default 'a',
-f31 FLOAT,
-f32 NUMERIC(17,9),
-f33 SET ('a', 'b', 'c') default 'b',
-f34 VARBINARY(1025),
-f35 VARCHAR(257)       
-) ENGINE='InnoDB';
-
-** Alter tables on slave and drop columns **
-
-alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
-f12;
-alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
-alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-alter table t31 
-drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
-drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
-drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
-drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
-drop f33, drop f34, drop f35;
-
-** Insert Data into Master **
-INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
-some var char';
-INSERT into t2 values (2, 2, 2, 'second',
-2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
-'01234567', 'c'),
-(3, 3, 3, 'third',
-3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
-'01234567', 'c');
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-Warning	1264	Out of range value for column 'f9' at row 2
-INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
-INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
-binary data';
-INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
-f9=2.2,  f10='seven samurai', f28=222.222, f35='222';
-Warnings:
-Warning	1366	Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011', 
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-      );
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 5, 'fifth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 6, 'sixth',
-/* f5  BIGINT,  */            NULL,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         NULL
-);
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-Warning	1264	Out of range value for column 'f5' at row 2
-Warning	1264	Out of range value for column 'f24' at row 2
-Warning	1264	Out of range value for column 'f24' at row 3
-
-** Sync slave with master ** 
-** Do selects from tables **
-
-select * from t1 order by f3;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-31	31	31	second
-32	32	32	second
-33	33	33	second
-34	34	34	second
-35	35	35	second
-36	36	36	second
-37	37	37	second
-38	38	38	second
-39	39	39	second
-40	40	40	second
-41	41	41	second
-42	42	42	second
-43	43	43	second
-44	44	44	second
-45	45	45	second
-46	46	46	second
-47	47	47	second
-48	48	48	second
-49	49	49	second
-50	50	50	second
-select * from t2 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-2	2	2	second
-3	3	3	third
-select * from t3 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t4 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t31 order by f3;
-f1	f2	f3	f4
-1	1	1	first
-1	1	2	second
-1	1	3	third
-1	1	4	fourth
-1	1	5	fifth
-1	1	6	sixth
-
-** Do updates master **
-
-update t31 set f5=555555555555555 where f3=6;
-update t31 set f2=2 where f3=2;
-update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
-
-** Delete from Master **
-
-delete from t1;
-delete from t2;
-delete from t3;
-delete from t4;
-delete from t31;
-
-** Check slave status **
-
-select * from t31;
-f1	f2	f3	f4
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-****************************************
-* columns in master at middle of table *
-* Expect: Proper error message         *
-****************************************
-
-** Stop and Reset Slave **
-
-STOP SLAVE;
-RESET SLAVE;
-
-** create table slave side **
-CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
-) ENGINE='InnoDB';
-
-** Connect to master and create table **
-
-CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
-c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
-(2,@b1,DEFAULT,'JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t10  ***
-DROP TABLE t10;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: Proper error message              *
-*********************************************
-
-*** Create t11 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
-) ENGINE='InnoDB';
-
-*** Create t11 on Master ***
-CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
-(2,@b1,'Testing is cool','JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t11  ***
-DROP TABLE t11;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: This one should pass blob-text    *
-*********************************************
-
-*** Create t12 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
-) ENGINE='InnoDB';
-
-*** Create t12 on Master ***
-CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',DEFAULT,DEFAULT),
-(3,@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
-a	hex(b)	f	c	e
-1	62316231623162316231623162316231	Kyle	test	1
-2	62316231623162316231623162316231	JOE	test	1
-3	62316231623162316231623162316231	QA	test	1
-
-*** Select on Slave ***
-SELECT a,hex(b),c FROM t12 ORDER BY a;
-a	hex(b)	c
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-*** Drop t12  ***
-DROP TABLE t12;
-
-****************************************************
-* - Alter Master adding columns at middle of table *
-*   Expect: columns added                          *
-****************************************************
-
-
-*** Create t14 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t14 on Master ***
-CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
-ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
-
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
-(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
-(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5	c6	c7
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP
-
-*** Select on Slave ****
-SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA
-
-****************************************************
-* - Alter Master Dropping columns from the middle. *
-*   Expect: columns dropped                        *
-****************************************************
-
-*** connect to master and drop columns ***
-ALTER TABLE t14 DROP COLUMN c2;
-ALTER TABLE t14 DROP COLUMN c7;
-
-*** Select from Master ***
-SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
-c1	c3	hex(c4)	c5	c6
-1	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1
-2	This Test Should work	62316231623162316231623162316231	JOE	1
-3	If is does not, I will open a bug	62316231623162316231623162316231	QA	1
-
-************
-* Bug30415 *
-************
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1091
-Last_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1091
-Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t14  ***
-DROP TABLE t14;
-DROP TABLE t14;
-RESET MASTER;
-START SLAVE;
-
-*************************************************
-* - Alter Master adding columns at end of table *
-*   Expect: Error 1054                          *
-*************************************************
-
-*** Create t15 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t15 on Master ***
-CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
-(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
-(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
-SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7	c2
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP	3.00
-2	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP	3.00
-3	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP	3.00
-
-********************************************
-*** Expect slave to fail with Error 1054 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1054
-Last_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1054
-Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t15  ***
-DROP TABLE t15;
-DROP TABLE t15;
-RESET MASTER;
-START SLAVE;
-
-************************************************
-* - Create index on Master column not on slave *
-*   Expect:Warning                             *
-************************************************
-
-*** Create t16 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t16 on Master ***
-CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Create Index and Data Insert ***
-CREATE INDEX part_of_c6 ON t16 (c6);
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-*****************
-*** BUG 30434 ***
-*****************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1072
-Last_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1072
-Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t16  ***
-DROP TABLE t16;
-DROP TABLE t16;
-RESET MASTER;
-START SLAVE;
-
-*****************************************************
-* - Delete rows using column on Master not on slave *
-*   Expect: Rows Deleted                            *
-*****************************************************
-
-*** Create t17 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t17 on Master ***
-CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** Delete from master **
-DELETE FROM t17 WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-DROP TABLE t17;
-
-
-*****************************************************
-* - Update row using column on Master not on slave *
-*   Expect: Rows updated                           *
-*****************************************************
-
-** Bug30674 **
-
-*** Create t18 on slave  ***
-
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t18 on Master ***
-CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** update from master **
-UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	TEST	3	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	TEST
-DROP TABLE t18;
-
-
-*****************************************************
-* - Insert UUID  column on Master not on slave *
-*   Expect: Rows inserted                      *
-*****************************************************
-
-*** Create t5 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t5 on Master ***
-CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 LONG, 
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
-(2,@b1,'JOE',UUID(),DEFAULT),
-(3,@b1,'QA',UUID(),DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	6231623162316231	Kyle	UUID	TIME
-2	6231623162316231	JOE	UUID	TIME
-3	6231623162316231	QA	UUID	TIME
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5
-1	6231623162316231	Kyle
-2	6231623162316231	JOE
-3	6231623162316231	QA
-DROP TABLE t5;
-
-set binlog_format=mixed;
-
-***********************************************************
-***********************************************************
-***************** Start of Testing ************************
-***********************************************************
-***********************************************************
-* This test format == binlog_format	MIXED and engine == 'InnoDB'
-***********************************************************
-***********************************************************
-
-***** Testing more columns on the Master *****
-
-CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 FLOAT DEFAULT '2.00', 
-f6 CHAR(4) DEFAULT 'TEST',
-f7 INT DEFAULT '0',
-f8 TEXT,
-f9 LONGBLOB,
-f10 BIT(63),
-f11 VARBINARY(64))ENGINE='InnoDB';
-
-* Alter Table on Slave and drop columns f5 through f11 *
-
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-
-* Insert data in Master then update and delete some rows*
-
-* Select count and 20 rows from Master *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
-hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(f11)
-2	2	2	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-3	3	3	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-5	5	5	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-6	6	6	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-8	8	8	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-9	9	9	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-11	11	11	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-12	12	12	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-14	14	14	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-15	15	15	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-17	17	17	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-18	18	18	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-20	20	20	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-21	21	21	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-23	23	23	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-24	24	24	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-26	26	26	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-
-* Select count and 20 rows from Slave *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT * FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-
-***** Testing Altering table def scenario *****
-
-CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f7 DECIMAL(17,9) default '1000.00',
-f8 MEDIUMBLOB,
-f9 NUMERIC(6,4) default '2000.00',
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='InnoDB';
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-
-CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f8 MEDIUMBLOB,
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='InnoDB';
-
-CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 DECIMAL(17,9) default '1000.00',
-f7 MEDIUMBLOB,
-f8 NUMERIC(6,4) default '2000.00',
-f9 VARCHAR(1024),
-f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f11 CHAR(255))
-ENGINE='InnoDB';
-Warnings:
-Warning	1264	Out of range value for column 'f8' at row 1
-
-CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5  BIGINT,
-f6  BLOB,
-f7  DATE,
-f8  DATETIME,
-f9  FLOAT,
-f10 INT,
-f11 LONGBLOB,
-f12 LONGTEXT,
-f13 MEDIUMBLOB,
-f14 MEDIUMINT,
-f15 MEDIUMTEXT,
-f16 REAL,
-f17 SMALLINT,
-f18 TEXT,
-f19 TIME,
-f20 TIMESTAMP,
-f21 TINYBLOB,
-f22 TINYINT,
-f23 TINYTEXT,
-f24 YEAR,
-f25 BINARY(255),
-f26 BIT(64),
-f27 CHAR(255),
-f28 DECIMAL(30,7),
-f29 DOUBLE,
-f30 ENUM ('a','b', 'c') default 'a',
-f31 FLOAT,
-f32 NUMERIC(17,9),
-f33 SET ('a', 'b', 'c') default 'b',
-f34 VARBINARY(1025),
-f35 VARCHAR(257)       
-) ENGINE='InnoDB';
-
-** Alter tables on slave and drop columns **
-
-alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
-f12;
-alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
-alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-alter table t31 
-drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
-drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
-drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
-drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
-drop f33, drop f34, drop f35;
-
-** Insert Data into Master **
-INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
-some var char';
-INSERT into t2 values (2, 2, 2, 'second',
-2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
-'01234567', 'c'),
-(3, 3, 3, 'third',
-3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
-'01234567', 'c');
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-Warning	1264	Out of range value for column 'f9' at row 2
-INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
-INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
-binary data';
-INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
-f9=2.2,  f10='seven samurai', f28=222.222, f35='222';
-Warnings:
-Warning	1366	Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011', 
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-      );
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 5, 'fifth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 6, 'sixth',
-/* f5  BIGINT,  */            NULL,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         NULL
-);
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-Warning	1264	Out of range value for column 'f5' at row 2
-Warning	1264	Out of range value for column 'f24' at row 2
-Warning	1264	Out of range value for column 'f24' at row 3
-
-** Sync slave with master ** 
-** Do selects from tables **
-
-select * from t1 order by f3;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-31	31	31	second
-32	32	32	second
-33	33	33	second
-34	34	34	second
-35	35	35	second
-36	36	36	second
-37	37	37	second
-38	38	38	second
-39	39	39	second
-40	40	40	second
-41	41	41	second
-42	42	42	second
-43	43	43	second
-44	44	44	second
-45	45	45	second
-46	46	46	second
-47	47	47	second
-48	48	48	second
-49	49	49	second
-50	50	50	second
-select * from t2 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-2	2	2	second
-3	3	3	third
-select * from t3 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t4 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t31 order by f3;
-f1	f2	f3	f4
-1	1	1	first
-1	1	2	second
-1	1	3	third
-1	1	4	fourth
-1	1	5	fifth
-1	1	6	sixth
-
-** Do updates master **
-
-update t31 set f5=555555555555555 where f3=6;
-update t31 set f2=2 where f3=2;
-update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
-
-** Delete from Master **
-
-delete from t1;
-delete from t2;
-delete from t3;
-delete from t4;
-delete from t31;
-
-** Check slave status **
-
-select * from t31;
-f1	f2	f3	f4
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-****************************************
-* columns in master at middle of table *
-* Expect: Proper error message         *
-****************************************
-
-** Stop and Reset Slave **
-
-STOP SLAVE;
-RESET SLAVE;
-
-** create table slave side **
-CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
-) ENGINE='InnoDB';
-
-** Connect to master and create table **
-
-CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
-c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
-(2,@b1,DEFAULT,'JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t10  ***
-DROP TABLE t10;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: Proper error message              *
-*********************************************
-
-*** Create t11 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
-) ENGINE='InnoDB';
-
-*** Create t11 on Master ***
-CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
-(2,@b1,'Testing is cool','JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t11  ***
-DROP TABLE t11;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: This one should pass blob-text    *
-*********************************************
-
-*** Create t12 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
-) ENGINE='InnoDB';
-
-*** Create t12 on Master ***
-CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',DEFAULT,DEFAULT),
-(3,@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
-a	hex(b)	f	c	e
-1	62316231623162316231623162316231	Kyle	test	1
-2	62316231623162316231623162316231	JOE	test	1
-3	62316231623162316231623162316231	QA	test	1
-
-*** Select on Slave ***
-SELECT a,hex(b),c FROM t12 ORDER BY a;
-a	hex(b)	c
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-*** Drop t12  ***
-DROP TABLE t12;
-
-****************************************************
-* - Alter Master adding columns at middle of table *
-*   Expect: columns added                          *
-****************************************************
-
-
-*** Create t14 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t14 on Master ***
-CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
-ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
-
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
-(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
-(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5	c6	c7
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP
-
-*** Select on Slave ****
-SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA
-
-****************************************************
-* - Alter Master Dropping columns from the middle. *
-*   Expect: columns dropped                        *
-****************************************************
-
-*** connect to master and drop columns ***
-ALTER TABLE t14 DROP COLUMN c2;
-ALTER TABLE t14 DROP COLUMN c7;
-
-*** Select from Master ***
-SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
-c1	c3	hex(c4)	c5	c6
-1	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1
-2	This Test Should work	62316231623162316231623162316231	JOE	1
-3	If is does not, I will open a bug	62316231623162316231623162316231	QA	1
-
-************
-* Bug30415 *
-************
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1091
-Last_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1091
-Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t14  ***
-DROP TABLE t14;
-DROP TABLE t14;
-RESET MASTER;
-START SLAVE;
-
-*************************************************
-* - Alter Master adding columns at end of table *
-*   Expect: Error 1054                          *
-*************************************************
-
-*** Create t15 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t15 on Master ***
-CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
-(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
-(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
-SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7	c2
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP	3.00
-2	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP	3.00
-3	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP	3.00
-
-********************************************
-*** Expect slave to fail with Error 1054 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1054
-Last_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1054
-Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t15  ***
-DROP TABLE t15;
-DROP TABLE t15;
-RESET MASTER;
-START SLAVE;
-
-************************************************
-* - Create index on Master column not on slave *
-*   Expect:Warning                             *
-************************************************
-
-*** Create t16 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t16 on Master ***
-CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Create Index and Data Insert ***
-CREATE INDEX part_of_c6 ON t16 (c6);
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-*****************
-*** BUG 30434 ***
-*****************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1072
-Last_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1072
-Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t16  ***
-DROP TABLE t16;
-DROP TABLE t16;
-RESET MASTER;
-START SLAVE;
-
-*****************************************************
-* - Delete rows using column on Master not on slave *
-*   Expect: Rows Deleted                            *
-*****************************************************
-
-*** Create t17 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t17 on Master ***
-CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** Delete from master **
-DELETE FROM t17 WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-DROP TABLE t17;
-
-
-*****************************************************
-* - Update row using column on Master not on slave *
-*   Expect: Rows updated                           *
-*****************************************************
-
-** Bug30674 **
-
-*** Create t18 on slave  ***
-
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t18 on Master ***
-CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** update from master **
-UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	TEST	3	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	TEST
-DROP TABLE t18;
-
-
-*****************************************************
-* - Insert UUID  column on Master not on slave *
-*   Expect: Rows inserted                      *
-*****************************************************
-
-*** Create t5 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='InnoDB';
-
-*** Create t5 on Master ***
-CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 LONG, 
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='InnoDB';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
-(2,@b1,'JOE',UUID(),DEFAULT),
-(3,@b1,'QA',UUID(),DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	6231623162316231	Kyle	UUID	TIME
-2	6231623162316231	JOE	UUID	TIME
-3	6231623162316231	QA	UUID	TIME
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5
-1	6231623162316231	Kyle
-2	6231623162316231	JOE
-3	6231623162316231	QA
-DROP TABLE t5;
-

=== modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result	2008-01-11 17:39:45 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result	2008-12-17 21:07:09 +0000
@@ -4,7 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-set binlog_format=row;
 
 ***********************************************************
 ***********************************************************
@@ -1143,2281 +1142,3 @@ c1	hex(c4)	c5
 3	6231623162316231	QA
 DROP TABLE t5;
 
-set binlog_format=statement;
-
-***********************************************************
-***********************************************************
-***************** Start of Testing ************************
-***********************************************************
-***********************************************************
-* This test format == binlog_format	STATEMENT and engine == 'MyISAM'
-***********************************************************
-***********************************************************
-
-***** Testing more columns on the Master *****
-
-CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 FLOAT DEFAULT '2.00', 
-f6 CHAR(4) DEFAULT 'TEST',
-f7 INT DEFAULT '0',
-f8 TEXT,
-f9 LONGBLOB,
-f10 BIT(63),
-f11 VARBINARY(64))ENGINE='MyISAM';
-
-* Alter Table on Slave and drop columns f5 through f11 *
-
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-
-* Insert data in Master then update and delete some rows*
-
-* Select count and 20 rows from Master *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
-hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(f11)
-2	2	2	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-3	3	3	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-5	5	5	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-6	6	6	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-8	8	8	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-9	9	9	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-11	11	11	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-12	12	12	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-14	14	14	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-15	15	15	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-17	17	17	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-18	18	18	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-20	20	20	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-21	21	21	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-23	23	23	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-24	24	24	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-26	26	26	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-
-* Select count and 20 rows from Slave *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT * FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-
-***** Testing Altering table def scenario *****
-
-CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f7 DECIMAL(17,9) default '1000.00',
-f8 MEDIUMBLOB,
-f9 NUMERIC(6,4) default '2000.00',
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='MyISAM';
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-
-CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f8 MEDIUMBLOB,
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='MyISAM';
-
-CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 DECIMAL(17,9) default '1000.00',
-f7 MEDIUMBLOB,
-f8 NUMERIC(6,4) default '2000.00',
-f9 VARCHAR(1024),
-f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f11 CHAR(255))
-ENGINE='MyISAM';
-Warnings:
-Warning	1264	Out of range value for column 'f8' at row 1
-
-CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5  BIGINT,
-f6  BLOB,
-f7  DATE,
-f8  DATETIME,
-f9  FLOAT,
-f10 INT,
-f11 LONGBLOB,
-f12 LONGTEXT,
-f13 MEDIUMBLOB,
-f14 MEDIUMINT,
-f15 MEDIUMTEXT,
-f16 REAL,
-f17 SMALLINT,
-f18 TEXT,
-f19 TIME,
-f20 TIMESTAMP,
-f21 TINYBLOB,
-f22 TINYINT,
-f23 TINYTEXT,
-f24 YEAR,
-f25 BINARY(255),
-f26 BIT(64),
-f27 CHAR(255),
-f28 DECIMAL(30,7),
-f29 DOUBLE,
-f30 ENUM ('a','b', 'c') default 'a',
-f31 FLOAT,
-f32 NUMERIC(17,9),
-f33 SET ('a', 'b', 'c') default 'b',
-f34 VARBINARY(1025),
-f35 VARCHAR(257)       

-) ENGINE='MyISAM';
-
-** Alter tables on slave and drop columns **
-
-alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
-f12;
-alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
-alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-alter table t31 
-drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
-drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
-drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
-drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
-drop f33, drop f34, drop f35;
-
-** Insert Data into Master **
-INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
-some var char';
-INSERT into t2 values (2, 2, 2, 'second',
-2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
-'01234567', 'c'),
-(3, 3, 3, 'third',
-3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
-'01234567', 'c');
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-Warning	1264	Out of range value for column 'f9' at row 2
-INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
-INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
-binary data';
-INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
-f9=2.2,  f10='seven samurai', f28=222.222, f35='222';
-Warnings:
-Warning	1366	Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011', 
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-      );
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 5, 'fifth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 6, 'sixth',
-/* f5  BIGINT,  */            NULL,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         NULL
-);
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-Warning	1264	Out of range value for column 'f5' at row 2
-Warning	1264	Out of range value for column 'f24' at row 2
-Warning	1264	Out of range value for column 'f24' at row 3
-
-** Sync slave with master ** 
-** Do selects from tables **
-
-select * from t1 order by f3;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-31	31	31	second
-32	32	32	second
-33	33	33	second
-34	34	34	second
-35	35	35	second
-36	36	36	second
-37	37	37	second
-38	38	38	second
-39	39	39	second
-40	40	40	second
-41	41	41	second
-42	42	42	second
-43	43	43	second
-44	44	44	second
-45	45	45	second
-46	46	46	second
-47	47	47	second
-48	48	48	second
-49	49	49	second
-50	50	50	second
-select * from t2 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-2	2	2	second
-3	3	3	third
-select * from t3 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t4 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t31 order by f3;
-f1	f2	f3	f4
-1	1	1	first
-1	1	2	second
-1	1	3	third
-1	1	4	fourth
-1	1	5	fifth
-1	1	6	sixth
-
-** Do updates master **
-
-update t31 set f5=555555555555555 where f3=6;
-update t31 set f2=2 where f3=2;
-update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
-
-** Delete from Master **
-
-delete from t1;
-delete from t2;
-delete from t3;
-delete from t4;
-delete from t31;
-
-** Check slave status **
-
-select * from t31;
-f1	f2	f3	f4
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-****************************************
-* columns in master at middle of table *
-* Expect: Proper error message         *
-****************************************
-
-** Stop and Reset Slave **
-
-STOP SLAVE;
-RESET SLAVE;
-
-** create table slave side **
-CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
-) ENGINE='MyISAM';
-
-** Connect to master and create table **
-
-CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
-c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
-(2,@b1,DEFAULT,'JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t10  ***
-DROP TABLE t10;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: Proper error message              *
-*********************************************
-
-*** Create t11 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
-) ENGINE='MyISAM';
-
-*** Create t11 on Master ***
-CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
-(2,@b1,'Testing is cool','JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t11  ***
-DROP TABLE t11;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: This one should pass blob-text    *
-*********************************************
-
-*** Create t12 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
-) ENGINE='MyISAM';
-
-*** Create t12 on Master ***
-CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',DEFAULT,DEFAULT),
-(3,@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
-a	hex(b)	f	c	e
-1	62316231623162316231623162316231	Kyle	test	1
-2	62316231623162316231623162316231	JOE	test	1
-3	62316231623162316231623162316231	QA	test	1
-
-*** Select on Slave ***
-SELECT a,hex(b),c FROM t12 ORDER BY a;
-a	hex(b)	c
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-*** Drop t12  ***
-DROP TABLE t12;
-
-****************************************************
-* - Alter Master adding columns at middle of table *
-*   Expect: columns added                          *
-****************************************************
-
-
-*** Create t14 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t14 on Master ***
-CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
-ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
-
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
-(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
-(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5	c6	c7
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP
-
-*** Select on Slave ****
-SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA
-
-****************************************************
-* - Alter Master Dropping columns from the middle. *
-*   Expect: columns dropped                        *
-****************************************************
-
-*** connect to master and drop columns ***
-ALTER TABLE t14 DROP COLUMN c2;
-ALTER TABLE t14 DROP COLUMN c7;
-
-*** Select from Master ***
-SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
-c1	c3	hex(c4)	c5	c6
-1	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1
-2	This Test Should work	62316231623162316231623162316231	JOE	1
-3	If is does not, I will open a bug	62316231623162316231623162316231	QA	1
-
-************
-* Bug30415 *
-************
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1091
-Last_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1091
-Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t14  ***
-DROP TABLE t14;
-DROP TABLE t14;
-RESET MASTER;
-START SLAVE;
-
-*************************************************
-* - Alter Master adding columns at end of table *
-*   Expect: Error 1054                          *
-*************************************************
-
-*** Create t15 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t15 on Master ***
-CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
-(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
-(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
-SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7	c2
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP	3.00
-2	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP	3.00
-3	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP	3.00
-
-********************************************
-*** Expect slave to fail with Error 1054 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1054
-Last_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1054
-Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t15  ***
-DROP TABLE t15;
-DROP TABLE t15;
-RESET MASTER;
-START SLAVE;
-
-************************************************
-* - Create index on Master column not on slave *
-*   Expect:Warning                             *
-************************************************
-
-*** Create t16 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t16 on Master ***
-CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Create Index and Data Insert ***
-CREATE INDEX part_of_c6 ON t16 (c6);
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-*****************
-*** BUG 30434 ***
-*****************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1072
-Last_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1072
-Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t16  ***
-DROP TABLE t16;
-DROP TABLE t16;
-RESET MASTER;
-START SLAVE;
-
-*****************************************************
-* - Delete rows using column on Master not on slave *
-*   Expect: Rows Deleted                            *
-*****************************************************
-
-*** Create t17 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t17 on Master ***
-CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** Delete from master **
-DELETE FROM t17 WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-DROP TABLE t17;
-
-
-*****************************************************
-* - Update row using column on Master not on slave *
-*   Expect: Rows updated                           *
-*****************************************************
-
-** Bug30674 **
-
-*** Create t18 on slave  ***
-
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t18 on Master ***
-CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** update from master **
-UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	TEST	3	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	TEST
-DROP TABLE t18;
-
-
-*****************************************************
-* - Insert UUID  column on Master not on slave *
-*   Expect: Rows inserted                      *
-*****************************************************
-
-*** Create t5 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t5 on Master ***
-CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 LONG, 
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
-(2,@b1,'JOE',UUID(),DEFAULT),
-(3,@b1,'QA',UUID(),DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	6231623162316231	Kyle	UUID	TIME
-2	6231623162316231	JOE	UUID	TIME
-3	6231623162316231	QA	UUID	TIME
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5
-1	6231623162316231	Kyle
-2	6231623162316231	JOE
-3	6231623162316231	QA
-DROP TABLE t5;
-
-set binlog_format=mixed;
-
-***********************************************************
-***********************************************************
-***************** Start of Testing ************************
-***********************************************************
-***********************************************************
-* This test format == binlog_format	MIXED and engine == 'MyISAM'
-***********************************************************
-***********************************************************
-
-***** Testing more columns on the Master *****
-
-CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 FLOAT DEFAULT '2.00', 
-f6 CHAR(4) DEFAULT 'TEST',
-f7 INT DEFAULT '0',
-f8 TEXT,
-f9 LONGBLOB,
-f10 BIT(63),
-f11 VARBINARY(64))ENGINE='MyISAM';
-
-* Alter Table on Slave and drop columns f5 through f11 *
-
-alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-
-* Insert data in Master then update and delete some rows*
-
-* Select count and 20 rows from Master *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
-hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(f11)
-2	2	2	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-3	3	3	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-5	5	5	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-6	6	6	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-8	8	8	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-9	9	9	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-11	11	11	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-12	12	12	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-14	14	14	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-15	15	15	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-17	17	17	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-18	18	18	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-20	20	20	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-21	21	21	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-23	23	23	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-24	24	24	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-26	26	26	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
-
-* Select count and 20 rows from Slave *
-
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-40
-
-SELECT * FROM t1 ORDER BY f3 LIMIT 20;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-
-***** Testing Altering table def scenario *****
-
-CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f7 DECIMAL(17,9) default '1000.00',
-f8 MEDIUMBLOB,
-f9 NUMERIC(6,4) default '2000.00',
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='MyISAM';
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-
-CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 ENUM('a', 'b', 'c') default 'a',
-f8 MEDIUMBLOB,
-f10 VARCHAR(1024),
-f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f12 SET('a', 'b', 'c') default 'b')
-ENGINE='MyISAM';
-
-CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5 DOUBLE DEFAULT '2.00', 
-f6 DECIMAL(17,9) default '1000.00',
-f7 MEDIUMBLOB,
-f8 NUMERIC(6,4) default '2000.00',
-f9 VARCHAR(1024),
-f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
-f11 CHAR(255))
-ENGINE='MyISAM';
-Warnings:
-Warning	1264	Out of range value for column 'f8' at row 1
-
-CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
-/* extra */
-f5  BIGINT,
-f6  BLOB,
-f7  DATE,
-f8  DATETIME,
-f9  FLOAT,
-f10 INT,
-f11 LONGBLOB,
-f12 LONGTEXT,
-f13 MEDIUMBLOB,
-f14 MEDIUMINT,
-f15 MEDIUMTEXT,
-f16 REAL,
-f17 SMALLINT,
-f18 TEXT,
-f19 TIME,
-f20 TIMESTAMP,
-f21 TINYBLOB,
-f22 TINYINT,
-f23 TINYTEXT,
-f24 YEAR,
-f25 BINARY(255),
-f26 BIT(64),
-f27 CHAR(255),
-f28 DECIMAL(30,7),
-f29 DOUBLE,
-f30 ENUM ('a','b', 'c') default 'a',
-f31 FLOAT,
-f32 NUMERIC(17,9),
-f33 SET ('a', 'b', 'c') default 'b',
-f34 VARBINARY(1025),
-f35 VARCHAR(257)       
-) ENGINE='MyISAM';
-
-** Alter tables on slave and drop columns **
-
-alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
-f12;
-alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
-alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
-alter table t31 
-drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
-drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
-drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
-drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
-drop f33, drop f34, drop f35;
-
-** Insert Data into Master **
-INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
-some var char';
-INSERT into t2 values (2, 2, 2, 'second',
-2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
-'01234567', 'c'),
-(3, 3, 3, 'third',
-3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
-'01234567', 'c');
-Warnings:
-Warning	1264	Out of range value for column 'f9' at row 1
-Warning	1264	Out of range value for column 'f9' at row 2
-INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
-INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
-binary data';
-INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
-f9=2.2,  f10='seven samurai', f28=222.222, f35='222';
-Warnings:
-Warning	1366	Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011', 
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-      );
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 5, 'fifth',
-/* f5  BIGINT,  */            333333333333333333333333,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         'three times three'
-       ),
-(1, 1, 6, 'sixth',
-/* f5  BIGINT,  */            NULL,
-/* f6  BLOB,  */              '3333333333333333333333',
-/* f7  DATE,  */              '2007-07-18',
-/* f8  DATETIME,  */          "2007-07-18",
-/* f9  FLOAT,  */             3.33333333,
-/* f10 INT,  */               333333333,
-/* f11 LONGBLOB,  */          '3333333333333333333',
-/* f12 LONGTEXT,  */          '3333333333333333333',
-/* f13 MEDIUMBLOB,  */        '3333333333333333333',
-/* f14 MEDIUMINT,  */         33,
-/* f15 MEDIUMTEXT,  */        3.3,
-/* f16 REAL,  */              3.3,
-/* f17 SMALLINT,  */          3,
-/* f18 TEXT,  */              '33',
-/* f19 TIME,  */              '2:59:58.999',
-/* f20 TIMESTAMP,  */         20000303000000,
-/* f21 TINYBLOB,  */          '3333',
-/* f22 TINYINT,  */           3,
-/* f23 TINYTEXT,  */          '3',
-/* f24 YEAR,  */              3000,
-/* f25 BINARY(255),  */       'three_33333',
-/* f26 BIT(64),  */           b'011',
-/* f27 CHAR(255),  */         'three',
-/* f28 DECIMAL(30,7),  */     3.333,
-/* f29 DOUBLE,  */            3.333333333333333333333333333,
-/* f30 ENUM ('a','b','c')*/   'c',
-/* f31 FLOAT,  */             3.0,
-/* f32 NUMERIC(17,9),  */     3.3333,
-/* f33 SET ('a','b','c'),*/   'c',
-/*f34 VARBINARY(1025),*/      '3333 minus 3',
-/*f35 VARCHAR(257),*/         NULL
-);
-Warnings:
-Warning	1264	Out of range value for column 'f5' at row 1
-Warning	1264	Out of range value for column 'f24' at row 1
-Warning	1264	Out of range value for column 'f5' at row 2
-Warning	1264	Out of range value for column 'f24' at row 2
-Warning	1264	Out of range value for column 'f24' at row 3
-
-** Sync slave with master ** 
-** Do selects from tables **
-
-select * from t1 order by f3;
-f1	f2	f3	f4
-2	2	2	second
-3	3	3	next
-5	5	5	second
-6	6	6	next
-8	8	8	second
-9	9	9	next
-11	11	11	second
-12	12	12	next
-14	14	14	second
-15	15	15	next
-17	17	17	second
-18	18	18	next
-20	20	20	second
-21	21	21	next
-23	23	23	second
-24	24	24	next
-26	26	26	second
-27	27	27	next
-29	29	29	second
-30	30	30	next
-31	31	31	second
-32	32	32	second
-33	33	33	second
-34	34	34	second
-35	35	35	second
-36	36	36	second
-37	37	37	second
-38	38	38	second
-39	39	39	second
-40	40	40	second
-41	41	41	second
-42	42	42	second
-43	43	43	second
-44	44	44	second
-45	45	45	second
-46	46	46	second
-47	47	47	second
-48	48	48	second
-49	49	49	second
-50	50	50	second
-select * from t2 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-2	2	2	second
-3	3	3	third
-select * from t3 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t4 order by f1;
-f1	f2	f3	f4
-1	1	1	first
-select * from t31 order by f3;
-f1	f2	f3	f4
-1	1	1	first
-1	1	2	second
-1	1	3	third
-1	1	4	fourth
-1	1	5	fifth
-1	1	6	sixth
-
-** Do updates master **
-
-update t31 set f5=555555555555555 where f3=6;
-update t31 set f2=2 where f3=2;
-update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
-
-** Delete from Master **
-
-delete from t1;
-delete from t2;
-delete from t3;
-delete from t4;
-delete from t31;
-
-** Check slave status **
-
-select * from t31;
-f1	f2	f3	f4
-show slave status;;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	Yes
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
-
-****************************************
-* columns in master at middle of table *
-* Expect: Proper error message         *
-****************************************
-
-** Stop and Reset Slave **
-
-STOP SLAVE;

-RESET SLAVE;
-
-** create table slave side **
-CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
-) ENGINE='MyISAM';
-
-** Connect to master and create table **
-
-CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
-c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
-(2,@b1,DEFAULT,'JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t10  ***
-DROP TABLE t10;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: Proper error message              *
-*********************************************
-
-*** Create t11 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
-) ENGINE='MyISAM';
-
-*** Create t11 on Master ***
-CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
-(2,@b1,'Testing is cool','JOE',DEFAULT),
-(3,@b1,DEFAULT,'QA',DEFAULT);
-
-********************************************
-*** Expect slave to fail with Error 1523 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1535
-Last_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1535
-Last_SQL_Error	Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
-
-*** Drop t11  ***
-DROP TABLE t11;
-
-*********************************************
-* More columns in master at middle of table *
-* Expect: This one should pass blob-text    *
-*********************************************
-
-*** Create t12 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
-) ENGINE='MyISAM';
-
-*** Create t12 on Master ***
-CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
-c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',DEFAULT,DEFAULT),
-(3,@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT a,hex(b),f,c,e FROM t12 ORDER BY a;
-a	hex(b)	f	c	e
-1	62316231623162316231623162316231	Kyle	test	1
-2	62316231623162316231623162316231	JOE	test	1
-3	62316231623162316231623162316231	QA	test	1
-
-*** Select on Slave ***
-SELECT a,hex(b),c FROM t12 ORDER BY a;
-a	hex(b)	c
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-*** Drop t12  ***
-DROP TABLE t12;
-
-****************************************************
-* - Alter Master adding columns at middle of table *
-*   Expect: columns added                          *
-****************************************************
-
-
-*** Create t14 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t14 on Master ***
-CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
-ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
-
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT),
-(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT),
-(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT);
-
-SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5	c6	c7
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP
-
-*** Select on Slave ****
-SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1;
-c1	c2	c3	hex(c4)	c5
-1	1.00	Replication Testing Extra Col	62316231623162316231623162316231	Kyle
-2	2.00	This Test Should work	62316231623162316231623162316231	JOE
-3	3.00	If is does not, I will open a bug	62316231623162316231623162316231	QA
-
-****************************************************
-* - Alter Master Dropping columns from the middle. *
-*   Expect: columns dropped                        *
-****************************************************
-
-*** connect to master and drop columns ***
-ALTER TABLE t14 DROP COLUMN c2;
-ALTER TABLE t14 DROP COLUMN c7;
-
-*** Select from Master ***
-SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
-c1	c3	hex(c4)	c5	c6
-1	Replication Testing Extra Col	62316231623162316231623162316231	Kyle	1
-2	This Test Should work	62316231623162316231623162316231	JOE	1
-3	If is does not, I will open a bug	62316231623162316231623162316231	QA	1
-
-************
-* Bug30415 *
-************
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1091
-Last_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1091
-Last_SQL_Error	Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t14  ***
-DROP TABLE t14;
-DROP TABLE t14;
-RESET MASTER;
-START SLAVE;
-
-*************************************************
-* - Alter Master adding columns at end of table *
-*   Expect: Error 1054                          *
-*************************************************
-
-*** Create t15 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t15 on Master ***
-CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
-(2,@b1,'JOE',DEFAULT,DEFAULT,3.00),
-(3,@b1,'QA',DEFAULT,DEFAULT,3.00);
-SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7	c2
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP	3.00
-2	62316231623162316231623162316231	JOE	1	CURRENT_TIMESTAMP	3.00
-3	62316231623162316231623162316231	QA	1	CURRENT_TIMESTAMP	3.00
-
-********************************************
-*** Expect slave to fail with Error 1054 ***
-********************************************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1054
-Last_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1054
-Last_SQL_Error	Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t15  ***
-DROP TABLE t15;
-DROP TABLE t15;
-RESET MASTER;
-START SLAVE;
-
-************************************************
-* - Create index on Master column not on slave *
-*   Expect:Warning                             *
-************************************************
-
-*** Create t16 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t16 on Master ***
-CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Create Index and Data Insert ***
-CREATE INDEX part_of_c6 ON t16 (c6);
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-*****************
-*** BUG 30434 ***
-*****************
-
-SHOW SLAVE STATUS;
-Slave_IO_State	#
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	#
-Connect_Retry	1
-Master_Log_File	master-bin.000001
-Read_Master_Log_Pos	#
-Relay_Log_File	#
-Relay_Log_Pos	#
-Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	
-Last_Errno	1072
-Last_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter	0
-Exec_Master_Log_Pos	#
-Relay_Log_Space	#
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	#
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	1072
-Last_SQL_Error	Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-STOP SLAVE;
-RESET SLAVE;
-
-*** Drop t16  ***
-DROP TABLE t16;
-DROP TABLE t16;
-RESET MASTER;
-START SLAVE;
-
-*****************************************************
-* - Delete rows using column on Master not on slave *
-*   Expect: Rows Deleted                            *
-*****************************************************
-
-*** Create t17 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t17 on Master ***
-CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** Delete from master **
-DELETE FROM t17 WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-DROP TABLE t17;
-
-
-*****************************************************
-* - Update row using column on Master not on slave *
-*   Expect: Rows updated                           *
-*****************************************************
-
-** Bug30674 **
-
-*** Create t18 on slave  ***
-
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t18 on Master ***
-CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 INT DEFAULT '1',
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-set @b1 = concat(@b1,@b1);
-INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT),
-(2,@b1,'JOE',2,DEFAULT),
-(3,@b1,'QA',3,DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	QA	3	CURRENT_TIMESTAMP
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	QA
-
-** update from master **
-UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3;
-SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	62316231623162316231623162316231	Kyle	1	CURRENT_TIMESTAMP
-2	62316231623162316231623162316231	JOE	2	CURRENT_TIMESTAMP
-3	62316231623162316231623162316231	TEST	3	CURRENT_TIMESTAMP
-
-** Check slave **
-SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1;
-c1	hex(c4)	c5
-1	62316231623162316231623162316231	Kyle
-2	62316231623162316231623162316231	JOE
-3	62316231623162316231623162316231	TEST
-DROP TABLE t18;
-
-
-*****************************************************
-* - Insert UUID  column on Master not on slave *
-*   Expect: Rows inserted                      *
-*****************************************************
-
-*** Create t5 on slave  ***
-STOP SLAVE;
-RESET SLAVE;
-CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
-) ENGINE='MyISAM';
-
-*** Create t5 on Master ***
-CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
-c6 LONG, 
-c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
-)ENGINE='MyISAM';
-RESET MASTER;
-
-*** Start Slave ***
-START SLAVE;
-
-*** Master Data Insert ***
-set @b1 = 'b1b1b1b1';
-INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT),
-(2,@b1,'JOE',UUID(),DEFAULT),
-(3,@b1,'QA',UUID(),DEFAULT);
-SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5	c6	c7
-1	6231623162316231	Kyle	UUID	TIME
-2	6231623162316231	JOE	UUID	TIME
-3	6231623162316231	QA	UUID	TIME
-
-** Select * from Slave **
-SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1;
-c1	hex(c4)	c5
-1	6231623162316231	Kyle
-2	6231623162316231	JOE
-3	6231623162316231	QA
-DROP TABLE t5;
-

=== modified file 'mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result	2007-12-12 10:14:59 +0000
+++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result	2008-12-17 21:07:09 +0000
@@ -46,7 +46,6 @@ engine = INNODB;
 insert into t1 set b=1;
 insert into t2 set a=1, b=1;
 set foreign_key_checks=0;
-set @@session.binlog_format=row;
 delete from t1;
 must sync w/o a problem (could not with the buggy code)
 select count(*) from t1 /* must be zero */;

=== modified file 'mysql-test/suite/rpl/r/rpl_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result	2007-12-12 10:14:59 +0000
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result	2008-12-17 21:07:09 +0000
@@ -88,6 +88,11 @@ select * from ti2 order by b /* must be 
 a	b
 1	1
 2	2
+stop slave;
+set global binlog_format=row;
+start slave;
+select @@global.binlog_format;
+@@global.binlog_format	ROW
 set @save_binlog_format= @@session.binlog_format;
 set @@session.binlog_format= row;
 delete from ti1 where b=1;

=== added file 'mysql-test/suite/rpl/r/rpl_mix_found_rows.result'
--- a/mysql-test/suite/rpl/r/rpl_mix_found_rows.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mix_found_rows.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,137 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+==== 1. Checking a procedure ====
+**** On Master ****
+CREATE TABLE t1 (a INT);
+CREATE TABLE logtbl (sect INT, test INT, count INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
+INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
+END $$
+**** On Master 1 ****
+SET BINLOG_FORMAT=MIXED;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,1);
+**** On Master ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,2);
+**** On Master 1 ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+CALL just_log(1,3);
+**** On Master ****
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+CALL just_log(1,4);
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect	test	count
+1	1	183
+1	2	183
+1	3	3
+1	4	183
+**** On Slave ****
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+sect	test	count
+1	1	183
+1	2	183
+1	3	3
+1	4	183
+==== 2. Checking a stored function ====
+**** On Master ****
+CREATE FUNCTION log_rows(sect INT, test INT)
+RETURNS INT
+BEGIN
+DECLARE found_rows INT;
+SELECT FOUND_ROWS() INTO found_rows;
+INSERT INTO logtbl VALUES(sect,test,found_rows);
+RETURN found_rows;
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+SELECT log_rows(2,1), log_rows(2,2);
+log_rows(2,1)	log_rows(2,2)
+3	3
+CREATE TABLE t2 (a INT, b INT);
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+a
+1
+INSERT INTO t2 VALUES (2,3), (2,4);
+DROP TRIGGER t2_tr;
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+DECLARE dummy INT;
+SELECT log_rows(NEW.a, NEW.b) INTO dummy;
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+INSERT INTO t2 VALUES (2,5), (2,6);
+DROP TRIGGER t2_tr;
+CREATE PROCEDURE log_me_inner(sect INT, test INT)
+BEGIN
+DECLARE dummy INT;
+SELECT log_rows(sect, test) INTO dummy;
+SELECT log_rows(sect, test+1) INTO dummy;
+END $$
+CREATE PROCEDURE log_me(sect INT, test INT)
+BEGIN
+CALL log_me_inner(sect,test);
+END $$

+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+CALL log_me(NEW.a, NEW.b);
+END $$
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+a
+7
+INSERT INTO t2 VALUES (2,5), (2,6);
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect	test	count
+2	1	3
+2	2	3
+2	3	3
+2	4	3
+2	5	183
+2	5	183
+2	6	183
+2	6	0
+2	6	183
+2	7	0
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sect	test	count
+2	1	3
+2	2	3
+2	3	3
+2	4	3
+2	5	183
+2	5	183
+2	6	183
+2	6	0
+2	6	183
+2	7	0
+DROP TABLE t1, t2, logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE log_me;
+DROP PROCEDURE log_me_inner;
+DROP FUNCTION log_rows;

=== added file 'mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result'
--- a/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,71 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE SCHEMA IF NOT EXISTS mysqlslap;
+USE mysqlslap;
+select @@global.binlog_format;
+@@global.binlog_format
+MIXED
+CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
+FLUSH TABLE t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5000
+use mysqlslap;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5000
+truncate table t1;
+insert delayed into t1 values(10, "my name");
+insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
+flush table t1;
+select * from t1;
+id	name
+10	my name
+20	James Bond
+select * from t1;
+id	name
+10	my name
+20	James Bond
+delete from t1 where id!=10;
+insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
+flush table t1;
+select * from t1;
+id	name
+10	my name
+20	is Bond
+select * from t1;
+id	name
+10	my name
+20	is Bond
+USE test;
+DROP SCHEMA mysqlslap;
+use test;
+FLUSH LOGS;
+FLUSH LOGS;
+CREATE TABLE t1(a int, UNIQUE(a));
+INSERT DELAYED IGNORE INTO t1 VALUES(1);
+INSERT DELAYED IGNORE INTO t1 VALUES(1);
+flush table t1;
+show binlog events in 'master-bin.000002' LIMIT 2,2;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+x	x	x	x	x	use `test`; BEGIN
+x	x	x	x	x	table_id: # (test.t1)
+select * from t1;
+a
+1
+On slave
+show binlog events in 'slave-bin.000002' LIMIT 2,2;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+x	x	x	x	x	use `test`; BEGIN
+x	x	x	x	x	table_id: # (test.t1)
+select * from t1;
+a
+1
+drop table t1;
+FLUSH LOGS;
+FLUSH LOGS;
+End of 5.0 tests

=== added file 'mysql-test/suite/rpl/r/rpl_mix_truncate_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_mix_truncate_2myisam.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mix_truncate_2myisam.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,64 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+DELETE FROM t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;

=== added file 'mysql-test/suite/rpl/r/rpl_mix_truncate_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_mix_truncate_3innodb.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mix_truncate_3innodb.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,64 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+DELETE FROM t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result'
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2008-12-17 21:07:09 +0000
@@ -4,11 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-SET BINLOG_FORMAT=MIXED;
-SET GLOBAL BINLOG_FORMAT=MIXED;
-SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
-@@GLOBAL.BINLOG_FORMAT	@@SESSION.BINLOG_FORMAT
-MIXED	MIXED
 **** On Master ****
 CREATE TABLE t1 (a INT, b LONG);
 INSERT INTO t1 VALUES (1,1), (2,2);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_max_relay_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result	2008-01-14 07:38:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result	2008-12-17 21:07:09 +0000
@@ -1,5 +1,3 @@
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL BINLOG_FORMAT=ROW;
 stop slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 reset master;

=== renamed file 'mysql-test/suite/rpl/r/rpl_truncate_2myisam.result' => 'mysql-test/suite/rpl/r/rpl_row_truncate_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result	2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_truncate_2myisam.result	2008-12-17 21:07:09 +0000
@@ -10,8 +10,6 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
-SET SESSION BINLOG_FORMAT=STATEMENT;
-SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
 INSERT INTO t1 VALUES (1,1), (2,2);
 SELECT * FROM t1;
@@ -34,13 +32,6 @@ SELECT * FROM t1;
 a	b
 **** On Master ****
 DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
@@ -48,163 +39,6 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
-SET SESSION BINLOG_FORMAT=MIXED;
-SET GLOBAL  BINLOG_FORMAT=MIXED;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-TRUNCATE TABLE t1;

-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL  BINLOG_FORMAT=ROW;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-TRUNCATE TABLE t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; 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	#	#	use `test`; COMMIT
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=STATEMENT;
-SET GLOBAL  BINLOG_FORMAT=STATEMENT;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-DELETE FROM t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=MIXED;
-SET GLOBAL  BINLOG_FORMAT=MIXED;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-DELETE FROM t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
 INSERT INTO t1 VALUES (1,1), (2,2);
 SELECT * FROM t1;
@@ -228,17 +62,4 @@ a	b
 3	3
 **** On Master ****
 DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
-master-bin.000001	#	Query	#	#	use `test`; 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	#	#	use `test`; COMMIT
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Query	#	#	use `test`; COMMIT
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;

=== renamed file 'mysql-test/suite/rpl/r/rpl_truncate_3innodb.result' => 'mysql-test/suite/rpl/r/rpl_row_truncate_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result	2007-12-14 13:40:45 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_truncate_3innodb.result	2008-12-17 21:07:09 +0000
@@ -10,8 +10,6 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
-SET SESSION BINLOG_FORMAT=STATEMENT;
-SET GLOBAL  BINLOG_FORMAT=STATEMENT;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
 INSERT INTO t1 VALUES (1,1), (2,2);
 SELECT * FROM t1;
@@ -34,17 +32,6 @@ SELECT * FROM t1;
 a	b
 **** On Master ****
 DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;
 STOP SLAVE;
 DROP TABLE IF EXISTS t1;
@@ -52,177 +39,6 @@ DROP TABLE IF EXISTS t1;
 RESET SLAVE;
 START SLAVE;
 **** On Master ****
-SET SESSION BINLOG_FORMAT=MIXED;
-SET GLOBAL  BINLOG_FORMAT=MIXED;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-TRUNCATE TABLE t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL  BINLOG_FORMAT=ROW;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-TRUNCATE TABLE t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-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 */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; TRUNCATE TABLE t1
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=STATEMENT;
-SET GLOBAL  BINLOG_FORMAT=STATEMENT;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-DELETE FROM t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=MIXED;
-SET GLOBAL  BINLOG_FORMAT=MIXED;
-CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
-INSERT INTO t1 VALUES (1,1), (2,2);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-**** On Slave ****
-INSERT INTO t1 VALUE (3,3);
-SELECT * FROM t1;
-a	b
-1	1
-2	2
-3	3
-**** On Master ****
-DELETE FROM t1;
-SELECT * FROM t1;
-a	b
-**** On Slave ****
-SELECT * FROM t1;
-a	b
-**** On Master ****
-DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Query	#	#	use `test`; DELETE FROM t1
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
-RESET MASTER;
-STOP SLAVE;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t1;
-RESET SLAVE;
-START SLAVE;
-**** On Master ****
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL  BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
 INSERT INTO t1 VALUES (1,1), (2,2);
 SELECT * FROM t1;
@@ -246,17 +62,4 @@ a	b
 3	3
 **** On Master ****
 DROP TABLE t1;
-show binlog events from <binlog_start>;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-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 */
-master-bin.000001	#	Query	#	#	use `test`; BEGIN
-master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
-master-bin.000001	#	Delete_rows	#	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Xid	#	#	COMMIT /* XID */
-master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t1
 RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_skip_error.result'
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result	2008-03-14 16:52:57 +0000
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result	2008-12-17 21:07:09 +0000
@@ -76,7 +76,7 @@ create table t1(a int primary key);
 insert into t1 values (1),(2);
 delete from t1 where @@server_id=1;
 Warnings:
-Warning	1592	Statement is not safe to log in statement format.
+Warning	1592	Unsafe statement binlogged as statement.
 set sql_mode=strict_trans_tables;
 insert into t1 values (7), (8), (9);
 [on slave]

=== renamed file 'mysql-test/suite/rpl/r/rpl_found_rows.result' => 'mysql-test/suite/rpl/r/rpl_stm_found_rows.result'
--- a/mysql-test/suite/rpl/r/rpl_found_rows.result	2008-09-02 09:14:13 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_found_rows.result	2008-12-17 21:07:09 +0000
@@ -4,8 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-==== 0. Setting it all up ====
-SET BINLOG_FORMAT=STATEMENT;
 **** On Master ****
 CREATE TABLE t1 (a INT);
 CREATE TABLE logtbl (sect INT, test INT, count INT);
@@ -98,136 +96,7 @@ sect	test	count
 3	2	183
 ==== 1.9. Cleanup ====
 **** On Master ****
-DELETE FROM logtbl;
+DROP TABLE t1, logtbl;
 DROP PROCEDURE just_log;
 DROP PROCEDURE calc_and_log;
 DROP FUNCTION log_rows;
-**** Resetting master and slave ****
-STOP SLAVE;
-RESET SLAVE;
-RESET MASTER;
-START SLAVE;
-#### 2. Using mixed mode ####
-==== 2.1. Checking a procedure ====
-**** On Master ****
-SET BINLOG_FORMAT=MIXED;
-CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
-INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
-END $$
-**** On Master 1 ****
-SET BINLOG_FORMAT=MIXED;
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-a
-7
-CALL just_log(1,1);
-**** On Master ****
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-a
-7
-CALL just_log(1,2);
-**** On Master 1 ****
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-a
-1
-CALL just_log(1,3);
-**** On Master ****
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-a
-7
-CALL just_log(1,4);
-SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
-sect	test	count
-1	1	183
-1	2	183
-1	3	3
-1	4	183
-**** On Slave ****
-SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
-sect	test	count
-1	1	183
-1	2	183
-1	3	3
-1	4	183
-==== 2.1. Checking a stored function ====
-**** On Master ****
-CREATE FUNCTION log_rows(sect INT, test INT)
-RETURNS INT
-BEGIN
-DECLARE found_rows INT;
-SELECT FOUND_ROWS() INTO found_rows;
-INSERT INTO logtbl VALUES(sect,test,found_rows);
-RETURN found_rows;
-END $$
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-a
-1
-SELECT log_rows(2,1), log_rows(2,2);
-log_rows(2,1)	log_rows(2,2)
-3	3
-CREATE TABLE t2 (a INT, b INT);
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
-END $$
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-a
-1
-INSERT INTO t2 VALUES (2,3), (2,4);
-DROP TRIGGER t2_tr;
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-DECLARE dummy INT;
-SELECT log_rows(NEW.a, NEW.b) INTO dummy;
-END $$
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-a
-7
-INSERT INTO t2 VALUES (2,5), (2,6);
-DROP TRIGGER t2_tr;
-CREATE PROCEDURE log_me_inner(sect INT, test INT)
-BEGIN
-DECLARE dummy INT;
-SELECT log_rows(sect, test) INTO dummy;
-SELECT log_rows(sect, test+1) INTO dummy;
-END $$
-CREATE PROCEDURE log_me(sect INT, test INT)
-BEGIN
-CALL log_me_inner(sect,test);
-END $$
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-CALL log_me(NEW.a, NEW.b);
-END $$
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-a
-7
-INSERT INTO t2 VALUES (2,5), (2,6);
-SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
-sect	test	count
-2	1	3
-2	2	3
-2	3	3
-2	4	3
-2	5	183
-2	5	183
-2	6	183
-2	6	0
-2	6	183
-2	7	0
-SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
-sect	test	count
-2	1	3
-2	2	3
-2	3	3
-2	4	3
-2	5	183
-2	5	183
-2	6	183
-2	6	0
-2	6	183
-2	7	0
-DROP TABLE t1, t2, logtbl;
-DROP PROCEDURE just_log;
-DROP PROCEDURE log_me;
-DROP PROCEDURE log_me_inner;
-DROP FUNCTION log_rows;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result	2007-07-27 11:28:36 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result	2008-12-17 21:07:09 +0000
@@ -4,8 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-set @old_global_binlog_format = @@global.binlog_format;
-set @@global.binlog_format = statement;
 CREATE SCHEMA IF NOT EXISTS mysqlslap;
 USE mysqlslap;
 select @@global.binlog_format;
@@ -71,70 +69,3 @@ drop table t1;
 FLUSH LOGS;
 FLUSH LOGS;
 End of 5.0 tests
-set @@global.binlog_format = mixed;
-CREATE SCHEMA IF NOT EXISTS mysqlslap;
-USE mysqlslap;
-select @@global.binlog_format;
-@@global.binlog_format
-MIXED
-CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
-FLUSH TABLE t1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-5000
-use mysqlslap;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-5000
-truncate table t1;
-insert delayed into t1 values(10, "my name");
-insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
-flush table t1;
-select * from t1;
-id	name
-10	my name
-20	James Bond
-select * from t1;
-id	name
-10	my name
-20	James Bond
-delete from t1 where id!=10;
-insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
-flush table t1;
-select * from t1;
-id	name
-10	my name
-20	is Bond
-select * from t1;
-id	name
-10	my name
-20	is Bond
-USE test;
-DROP SCHEMA mysqlslap;
-use test;
-FLUSH LOGS;
-FLUSH LOGS;
-CREATE TABLE t1(a int, UNIQUE(a));
-INSERT DELAYED IGNORE INTO t1 VALUES(1);
-INSERT DELAYED IGNORE INTO t1 VALUES(1);
-flush table t1;
-show binlog events in 'master-bin.000002' LIMIT 2,2;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-select * from t1;
-a
-1
-On slave
-show binlog events in 'slave-bin.000002' LIMIT 2,2;
-Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x	x	x	x	x	use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-select * from t1;
-a
-1
-drop table t1;
-FLUSH LOGS;
-FLUSH LOGS;
-End of 5.0 tests
-set @@global.binlog_format = @old_global_binlog_format;

=== added file 'mysql-test/suite/rpl/r/rpl_stm_truncate_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_truncate_2myisam.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_truncate_2myisam.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,64 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+DELETE FROM t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;

=== added file 'mysql-test/suite/rpl/r/rpl_stm_truncate_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_truncate_3innodb.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_truncate_3innodb.result	2008-12-17 21:07:09 +0000
@@ -0,0 +1,64 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;
+STOP SLAVE;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1;
+RESET SLAVE;
+START SLAVE;
+**** On Master ****
+CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+**** On Slave ****
+INSERT INTO t1 VALUE (3,3);
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+**** On Master ****
+DELETE FROM t1;
+SELECT * FROM t1;
+a	b
+**** On Slave ****
+SELECT * FROM t1;
+a	b
+**** On Master ****
+DROP TABLE t1;
+RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_temporary_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2008-01-14 07:38:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2008-12-17 21:07:09 +0000
@@ -5,7 +5,6 @@ reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 **** On Master ****
-SET SESSION BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
 INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
 **** On Slave ****

=== modified file 'mysql-test/suite/rpl/r/rpl_udf.result'
--- a/mysql-test/suite/rpl/r/rpl_udf.result	2007-10-26 20:40:48 +0000
+++ b/mysql-test/suite/rpl/r/rpl_udf.result	2008-12-17 21:07:09 +0000
@@ -4,7 +4,6 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-set binlog_format=row;
 drop table if exists t1;
 "*** Test 1) Test UDFs via loadable libraries ***
 "Running on the master"
@@ -156,163 +155,3 @@ affected rows: 0
 "Running on the master"
 DROP TABLE t1;
 affected rows: 0
-set binlog_format=statement;
-drop table if exists t1;
-"*** Test 1) Test UDFs via loadable libraries ***
-"Running on the master"
-CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
-affected rows: 0
-CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
-affected rows: 0
-CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
-ERROR HY000: Can't find symbol 'myfunc_nonexist' in library
-SELECT * FROM mysql.func ORDER BY name;
-name	ret	dl	type
-myfunc_double	1	UDF_LIB	function
-myfunc_int	2	UDF_LIB	function
-affected rows: 2
-"Running on the slave"
-SELECT * FROM mysql.func ORDER BY name;
-name	ret	dl	type
-myfunc_double	1	UDF_LIB	function
-myfunc_int	2	UDF_LIB	function
-affected rows: 2
-"Running on the master"
-CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
-affected rows: 0
-INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
-Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-affected rows: 1
-INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
-Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-affected rows: 1
-INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
-Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-affected rows: 1
-INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
-Warnings:
-Warning	1592	Statement is not safe to log in statement format.
-affected rows: 1
-SELECT * FROM t1 ORDER BY sum;
-sum	price
-1	48.5
-10	48.75
-100	48.6
-200	49
-affected rows: 4
-"Running on the slave"
-SELECT * FROM t1 ORDER BY sum;
-sum	price
-1	48.5
-10	48.75
-100	48.6
-200	49
-affected rows: 4
-SELECT myfunc_int(25);
-myfunc_int(25)
-25
-affected rows: 1
-SELECT myfunc_double(75.00);
-myfunc_double(75.00)
-50.00
-affected rows: 1
-"Running on the master"
-DROP FUNCTION myfunc_double;
-affected rows: 0
-DROP FUNCTION myfunc_int;
-affected rows: 0
-SELECT * FROM mysql.func ORDER BY name;
-name	ret	dl	type
-affected rows: 0
-"Running on the slave"
-SELECT * FROM mysql.func ORDER BY name;
-name	ret	dl	type
-affected rows: 0
-"Running on the master"
-DROP TABLE t1;
-affected rows: 0
-"*** Test 2) Test UDFs with SQL body ***
-"Running on the master"
-CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i;
-affected rows: 0
-CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00;
-affected rows: 0
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-test	myfuncsql_double	FUNCTION	d DOUBLE	RETURN d * 2.00	
-test	myfuncsql_int	FUNCTION	i INT	RETURN i	
-affected rows: 2
-"Running on the slave"
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-test	myfuncsql_double	FUNCTION	d DOUBLE	RETURN d * 2.00	
-test	myfuncsql_int	FUNCTION	i INT	RETURN i	
-affected rows: 2
-"Running on the master"
-CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
-affected rows: 0
-INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00));
-affected rows: 1
-INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00));
-affected rows: 1
-INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00));
-affected rows: 1
-INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00));
-affected rows: 1
-SELECT * FROM t1 ORDER BY sum;
-sum	price
-1	1000
-10	10
-100	100
-200	50
-affected rows: 4
-"Running on the slave"
-SELECT * FROM t1 ORDER BY sum;
-sum	price
-1	1000
-10	10
-100	100
-200	50
-affected rows: 4
-"Running on the master"
-ALTER FUNCTION myfuncsql_int COMMENT "This was altered.";
-affected rows: 0
-ALTER FUNCTION myfuncsql_double COMMENT "This was altered.";
-affected rows: 0
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-test	myfuncsql_double	FUNCTION	d DOUBLE	RETURN d * 2.00	This was altered.
-test	myfuncsql_int	FUNCTION	i INT	RETURN i	This was altered.
-affected rows: 2
-"Running on the slave"
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-test	myfuncsql_double	FUNCTION	d DOUBLE	RETURN d * 2.00	This was altered.
-test	myfuncsql_int	FUNCTION	i INT	RETURN i	This was altered.
-affected rows: 2
-SELECT myfuncsql_int(25);
-myfuncsql_int(25)
-25
-affected rows: 1
-SELECT myfuncsql_double(75.00);
-myfuncsql_double(75.00)
-150
-affected rows: 1
-"Running on the master"
-DROP FUNCTION myfuncsql_double;
-affected rows: 0
-DROP FUNCTION myfuncsql_int;
-affected rows: 0
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-affected rows: 0
-"Running on the slave"
-SELECT db, name, type,  param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%' ORDER BY name;
-db	name	type	param_list	body	comment
-affected rows: 0
-"Running on the master"
-DROP TABLE t1;
-affected rows: 0

=== modified file 'mysql-test/suite/rpl/t/rpl_bug31076.test'
--- a/mysql-test/suite/rpl/t/rpl_bug31076.test	2007-12-14 18:02:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug31076.test	2008-12-17 21:07:09 +0000
@@ -1,4 +1,5 @@
 source include/master-slave.inc;
+source include/have_binlog_format_mixed_or_row.inc;
 
 CREATE DATABASE track;
 USE track;

=== modified file 'mysql-test/suite/rpl/t/rpl_events.test'
--- a/mysql-test/suite/rpl/t/rpl_events.test	2008-02-14 09:53:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_events.test	2008-12-17 21:07:09 +0000
@@ -7,19 +7,10 @@
 
 set global event_scheduler=1;
 
---source include/not_embedded.inc
 --source include/master-slave.inc
 
 let $engine_type= MyISAM;
 
-set binlog_format=row;
-
-# Embedded server doesn't support binlogging
---source include/rpl_events.inc
-
-set binlog_format=statement;
-
-# Embedded server doesn't support binlogging
 --source include/rpl_events.inc
 
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test	2007-10-10 14:43:20 +0000
+++ b/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test	2008-12-17 21:07:09 +0000
@@ -3,14 +3,7 @@
 #############################################################
 -- source include/master-slave.inc
 -- source include/have_innodb.inc
+source include/have_binlog_format_row.inc;
 
 let $engine_type = 'InnoDB';
-
-set binlog_format=row;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
-set binlog_format=statement;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
-set binlog_format=mixed;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
+--source extra/rpl_tests/rpl_extraMaster_Col.test

=== modified file 'mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test'
--- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test	2007-10-10 14:43:20 +0000
+++ b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test	2008-12-17 21:07:09 +0000
@@ -2,14 +2,7 @@
 # Purpose: To test having extra columns on the master WL#3915
 #############################################################
 -- source include/master-slave.inc
+source include/have_binlog_format_row.inc;
 
 let $engine_type = 'MyISAM';
-
-set binlog_format=row;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
-set binlog_format=statement;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
-
-set binlog_format=mixed;
--- source extra/rpl_tests/rpl_extraMaster_Col.test
+--source extra/rpl_tests/rpl_extraMaster_Col.test

=== modified file 'mysql-test/suite/rpl/t/rpl_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2008-02-04 07:43:22 +0000
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2008-12-17 21:07:09 +0000
@@ -121,6 +121,13 @@ select * from ti1 order by b /* must be 
 insert into ti2 set a=1, b=1;
 select * from ti2 order by b /* must be (1,1) (2,2) */;
 
+# Need to do this Fandango to set the format for the slave thread.
+connection slave;
+stop slave;
+set global binlog_format=row;
+start slave;
+query_vertical select @@global.binlog_format;
+ 
 connection master;
 
 # from now on checking rbr specific idempotent errors

=== added file 'mysql-test/suite/rpl/t/rpl_mix_found_rows.test'
--- a/mysql-test/suite/rpl/t/rpl_mix_found_rows.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mix_found_rows.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,149 @@
+source include/master-slave.inc;
+source include/have_binlog_format_mixed.inc;
+
+# The purpose of this test case is to test that FOUND_ROWS() can be
+# replicated properly under MIXED mode (on both master and slave).
+
+--echo ==== 1. Checking a procedure ====
+
+--echo **** On Master ****
+connection master;
+CREATE TABLE t1 (a INT);
+CREATE TABLE logtbl (sect INT, test INT, count INT);
+
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+INSERT INTO t1 SELECT 2*a+3 FROM t1;
+
+# We will now check some stuff that will not work in statement-based
+# replication, but which should cause the binary log to switch to
+# row-based logging.
+
+--delimiter $$
+CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
+  INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
+END $$
+--delimiter ;
+sync_slave_with_master;
+
+--echo **** On Master 1 ****
+connection master1;
+SET BINLOG_FORMAT=MIXED;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,1);
+
+--echo **** On Master ****
+connection master;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,2);
+
+--echo **** On Master 1 ****
+
+connection master1;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+CALL just_log(1,3);
+sync_slave_with_master;
+
+--echo **** On Master ****
+connection master;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+CALL just_log(1,4);
+sync_slave_with_master;
+
+connection master;
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
+
+--echo ==== 2. Checking a stored function ====
+--echo **** On Master ****
+connection master;
+--delimiter $$
+CREATE FUNCTION log_rows(sect INT, test INT)
+  RETURNS INT
+BEGIN
+  DECLARE found_rows INT;
+  SELECT FOUND_ROWS() INTO found_rows;
+  INSERT INTO logtbl VALUES(sect,test,found_rows);
+  RETURN found_rows;
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+SELECT log_rows(2,1), log_rows(2,2);
+
+CREATE TABLE t2 (a INT, b INT);
+
+# Trying with referencing FOUND_ROWS() directly in the trigger.
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+  INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,3), (2,4);
+
+# Referencing FOUND_ROWS() indirectly.
+
+DROP TRIGGER t2_tr;
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+  DECLARE dummy INT;
+  SELECT log_rows(NEW.a, NEW.b) INTO dummy;
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,5), (2,6);
+
+# Putting FOUND_ROWS() even lower in the call chain.
+
+connection master;
+DROP TRIGGER t2_tr;
+
+--delimiter $$
+CREATE PROCEDURE log_me_inner(sect INT, test INT)
+BEGIN
+  DECLARE dummy INT;
+  SELECT log_rows(sect, test) INTO dummy;
+  SELECT log_rows(sect, test+1) INTO dummy;
+END $$
+
+CREATE PROCEDURE log_me(sect INT, test INT)
+BEGIN
+  CALL log_me_inner(sect,test);
+END $$
+--delimiter ;
+
+--delimiter $$
+CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
+BEGIN
+  CALL log_me(NEW.a, NEW.b);
+END $$
+--delimiter ;
+
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
+INSERT INTO t2 VALUES (2,5), (2,6);
+
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+sync_slave_with_master;
+SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
+
+connection master;
+DROP TABLE t1, t2, logtbl;
+DROP PROCEDURE just_log;
+DROP PROCEDURE log_me;
+DROP PROCEDURE log_me_inner;
+DROP FUNCTION log_rows;
+sync_slave_with_master;
+

=== added file 'mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test'
--- a/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,8 @@
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+--source include/not_embedded.inc
+--source include/not_windows.inc
+
+connection master;
+let $binlog_format_statement=0;
+--source extra/rpl_tests/rpl_insert_delayed.test

=== added file 'mysql-test/suite/rpl/t/rpl_mix_truncate_2myisam.test'
--- a/mysql-test/suite/rpl/t/rpl_mix_truncate_2myisam.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mix_truncate_2myisam.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,5 @@
+--source include/not_ndb_default.inc
+--source include/have_binlog_format_mixed.inc
+let $engine=MyISAM;
+--source extra/rpl_tests/rpl_truncate.test
+

=== added file 'mysql-test/suite/rpl/t/rpl_mix_truncate_3innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_mix_truncate_3innodb.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_mix_truncate_3innodb.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,6 @@
+--source include/have_innodb.inc
+--source include/not_ndb_default.inc
+--source include/have_binlog_format_mixed.inc
+
+let $engine=InnoDB;
+--source extra/rpl_tests/rpl_truncate.test

=== modified file 'mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test'
--- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2007-06-27 12:29:10 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2008-12-17 21:07:09 +0000
@@ -1,13 +1,9 @@
--- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_binlog_format_mixed.inc
 -- source include/not_ndb_default.inc
 -- source include/master-slave.inc
 
 # Test that the slave temporarily switches to ROW when seeing binrow
-# events when it is in STATEMENT or MIXED mode
-
-SET BINLOG_FORMAT=MIXED;
-SET GLOBAL BINLOG_FORMAT=MIXED;
-SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
+# events when it is in MIXED mode
 
 --echo **** On Master ****
 CREATE TABLE t1 (a INT, b LONG);

=== modified file 'mysql-test/suite/rpl/t/rpl_row_max_relay_size.test'
--- a/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test	2008-12-17 21:07:09 +0000
@@ -5,7 +5,6 @@
 
 # Requires statement logging
 -- source include/not_ndb_default.inc
-SET SESSION BINLOG_FORMAT=ROW;
-SET GLOBAL BINLOG_FORMAT=ROW;
+-- source include/have_binlog_format_row.inc
 -- source extra/rpl_tests/rpl_max_relay_size.test
 

=== renamed file 'mysql-test/suite/rpl/t/rpl_truncate_2myisam.test' => 'mysql-test/suite/rpl/t/rpl_row_truncate_2myisam.test'
--- a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_truncate_2myisam.test	2008-12-17 21:07:09 +0000
@@ -1,4 +1,5 @@
 --source include/not_ndb_default.inc
+--source include/have_binlog_format_row.inc
 let $engine=MyISAM;
 --source extra/rpl_tests/rpl_truncate.test
 

=== renamed file 'mysql-test/suite/rpl/t/rpl_truncate_3innodb.test' => 'mysql-test/suite/rpl/t/rpl_row_truncate_3innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_truncate_3innodb.test	2008-12-17 21:07:09 +0000
@@ -1,6 +1,6 @@
-
 --source include/have_innodb.inc
 --source include/not_ndb_default.inc
+--source include/have_binlog_format_row.inc
 
 let $engine=InnoDB;
 --source extra/rpl_tests/rpl_truncate.test

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_skip.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test	2008-03-28 12:16:41 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test	2008-12-17 21:07:09 +0000
@@ -1,6 +1,12 @@
 source include/master-slave.inc;
 source include/have_innodb.inc;
 
+# Every statement in this test is either executing under ROW or
+# STATEMENT format, which requires the slave thread to be able to apply
+# both statement and row events. Hence, we only need to execute this
+# test for MIXED mode.
+source include/have_binlog_format_mixed.inc;
+
 --echo **** On Slave ****
 connection slave;
 source include/have_innodb.inc;

=== renamed file 'mysql-test/suite/rpl/t/rpl_found_rows.test' => 'mysql-test/suite/rpl/t/rpl_stm_found_rows.test'
--- a/mysql-test/suite/rpl/t/rpl_found_rows.test	2008-09-02 09:14:13 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test	2008-12-17 21:07:09 +0000
@@ -8,9 +8,7 @@ source include/master-slave.inc;
 # function properly even when inside stored programs (i.e., stored
 # routines and triggers).
 
---echo ==== 0. Setting it all up ====
-
-SET BINLOG_FORMAT=STATEMENT;
+source include/have_binlog_format_statement.inc;
 
 --echo **** On Master ****
 connection master;
@@ -110,147 +108,8 @@ SELECT * FROM logtbl WHERE sect = 3 ORDE
 --echo ==== 1.9. Cleanup ====
 --echo **** On Master ****
 connection master;
-DELETE FROM logtbl;
+DROP TABLE t1, logtbl;
 DROP PROCEDURE just_log;
 DROP PROCEDURE calc_and_log;
 DROP FUNCTION log_rows;
 sync_slave_with_master;
-
-source include/reset_master_and_slave.inc;
-
---echo #### 2. Using mixed mode ####
-
---echo ==== 2.1. Checking a procedure ====
-
---echo **** On Master ****
-connection master;
-SET BINLOG_FORMAT=MIXED;
-
-# We will now check some stuff that will not work in statement-based
-# replication, but which should cause the binary log to switch to
-# row-based logging.
-
---delimiter $$
-CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
-  INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
-END $$
---delimiter ;
-sync_slave_with_master;
-
---echo **** On Master 1 ****
-connection master1;
-SET BINLOG_FORMAT=MIXED;
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-CALL just_log(1,1);
-
---echo **** On Master ****
-connection master;
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-CALL just_log(1,2);
-
---echo **** On Master 1 ****
-
-connection master1;
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-CALL just_log(1,3);
-sync_slave_with_master;
-
---echo **** On Master ****
-connection master;
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-CALL just_log(1,4);
-sync_slave_with_master;
-
-connection master;
-SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
---echo **** On Slave ****
-sync_slave_with_master;
-SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
-
---echo ==== 2.1. Checking a stored function ====
---echo **** On Master ****
-connection master;
---delimiter $$
-CREATE FUNCTION log_rows(sect INT, test INT)
-  RETURNS INT
-BEGIN
-  DECLARE found_rows INT;
-  SELECT FOUND_ROWS() INTO found_rows;
-  INSERT INTO logtbl VALUES(sect,test,found_rows);
-  RETURN found_rows;
-END $$
---delimiter ;
-
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-SELECT log_rows(2,1), log_rows(2,2);
-
-CREATE TABLE t2 (a INT, b INT);
-
-# Trying with referencing FOUND_ROWS() directly in the trigger.
-
---delimiter $$
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-  INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
-END $$
---delimiter ;
-
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
-INSERT INTO t2 VALUES (2,3), (2,4);
-
-# Referencing FOUND_ROWS() indirectly.
-
-DROP TRIGGER t2_tr;
-
---delimiter $$
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-  DECLARE dummy INT;
-  SELECT log_rows(NEW.a, NEW.b) INTO dummy;
-END $$
---delimiter ;
-
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-INSERT INTO t2 VALUES (2,5), (2,6);
-
-# Putting FOUND_ROWS() even lower in the call chain.
-
-connection master;
-DROP TRIGGER t2_tr;
-
---delimiter $$
-CREATE PROCEDURE log_me_inner(sect INT, test INT)
-BEGIN
-  DECLARE dummy INT;
-  SELECT log_rows(sect, test) INTO dummy;
-  SELECT log_rows(sect, test+1) INTO dummy;
-END $$
-
-CREATE PROCEDURE log_me(sect INT, test INT)
-BEGIN
-  CALL log_me_inner(sect,test);
-END $$
---delimiter ;
-
---delimiter $$
-CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
-BEGIN
-  CALL log_me(NEW.a, NEW.b);
-END $$
---delimiter ;
-
-SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
-INSERT INTO t2 VALUES (2,5), (2,6);
-
-SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
-sync_slave_with_master;
-SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
-
-connection master;
-DROP TABLE t1, t2, logtbl;
-DROP PROCEDURE just_log;
-DROP PROCEDURE log_me;
-DROP PROCEDURE log_me_inner;
-DROP FUNCTION log_rows;
-sync_slave_with_master;
-

=== modified file 'mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test	2008-12-17 21:07:09 +0000
@@ -1,20 +1,8 @@
-# we run first in statement-based then in mixed binlogging
-
---source include/have_binlog_format_mixed_or_statement.inc
+--source include/have_binlog_format_statement.inc
 --source include/master-slave.inc
 --source include/not_embedded.inc
 --source include/not_windows.inc
 
 connection master;
-set @old_global_binlog_format = @@global.binlog_format;
-
 let $binlog_format_statement=1;
-set @@global.binlog_format = statement;
---source extra/rpl_tests/rpl_insert_delayed.test
-
-let $binlog_format_statement=0;
-set @@global.binlog_format = mixed;
 --source extra/rpl_tests/rpl_insert_delayed.test
-
-connection master;
-set @@global.binlog_format = @old_global_binlog_format;

=== added file 'mysql-test/suite/rpl/t/rpl_stm_truncate_2myisam.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_truncate_2myisam.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_truncate_2myisam.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,5 @@
+--source include/not_ndb_default.inc
+--source include/have_binlog_format_statement.inc
+let $engine=MyISAM;
+--source extra/rpl_tests/rpl_truncate.test
+

=== added file 'mysql-test/suite/rpl/t/rpl_stm_truncate_3innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_truncate_3innodb.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_truncate_3innodb.test	2008-12-17 21:07:09 +0000
@@ -0,0 +1,6 @@
+--source include/have_innodb.inc
+--source include/not_ndb_default.inc
+--source include/have_binlog_format_statement.inc
+
+let $engine=InnoDB;
+--source extra/rpl_tests/rpl_truncate.test

=== modified file 'mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test'
--- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test	2008-07-03 08:27:25 +0000
+++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test	2008-12-17 21:07:09 +0000
@@ -1,17 +1,25 @@
 #
 # rpl_switch_stm_row_mixed tests covers
 #
-#   - switching explicitly between STATEMENT, ROW, and MIXED binlog format
-#     showing when it is possible and when not. 
-#   - switching from MIXED to RBR implicitly listing all use cases,
-#     e.g a query invokes UUID(), thereafter to serve as the definition
-#     of MIXED binlog format
+#   - Master is switching explicitly between STATEMENT, ROW, and MIXED
+#     binlog format showing when it is possible and when not. 
+#   - Master switching from MIXED to RBR implicitly listing all use
+#     cases, e.g a query invokes UUID(), thereafter to serve as the
+#     definition of MIXED binlog format
 #   - correctness of execution
 
 
 -- source include/not_ndb_default.inc
 -- source include/master-slave.inc
 
+# Since this test generates row-based events in the binary log, the
+# slave SQL thread cannot be in STATEMENT mode to execute this test,
+# so we only execute it for MIXED and ROW as default value of
+# BINLOG_FORMAT.
+
+connection slave;
+-- source include/have_binlog_format_mixed_or_row.inc
+
 connection master;
 --disable_warnings
 drop database if exists mysqltest1;

=== modified file 'mysql-test/suite/rpl/t/rpl_temporary_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2008-01-14 09:54:23 +0000
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2008-12-17 21:07:09 +0000
@@ -1,8 +1,8 @@
 source include/master-slave.inc;
+source include/have_binlog_format_row.inc;
 
 --echo **** On Master ****
 connection master;
-SET SESSION BINLOG_FORMAT=ROW;
 CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
 INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
 --echo **** On Slave ****

=== modified file 'mysql-test/suite/rpl/t/rpl_udf.test'
--- a/mysql-test/suite/rpl/t/rpl_udf.test	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_udf.test	2008-12-17 21:07:09 +0000
@@ -5,18 +5,7 @@
 # statement based format. This tests work completed in WL#3629.   #
 ###################################################################
 
---source include/not_embedded.inc
 --source include/master-slave.inc
 
 let $engine_type= MyISAM;
-
-set binlog_format=row;
-
-# Embedded server doesn't support binlogging
---source include/rpl_udf.inc
-
-set binlog_format=statement;
-
-# Embedded server doesn't support binlogging
 --source include/rpl_udf.inc
-

=== added file 'mysql-test/suite/rpl_ndb/combinations'
--- a/mysql-test/suite/rpl_ndb/combinations	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl_ndb/combinations	2008-12-17 21:07:09 +0000
@@ -0,0 +1,8 @@
+[stmt]
+--binlog-format=statement
+
+[mix]
+--binlog-format=mixed
+
+[row]
+--binlog-format=row

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test	2008-02-11 14:26:38 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test	2008-12-17 21:07:09 +0000
@@ -6,9 +6,14 @@
 # cluster slave. Due to limitations I have created wrappers
 # to be able to use the same code for all these different
 # test and to have control over the tests.
+#
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+#
 ##############################################################
 -- source include/have_ndb.inc
 -- source include/master-slave.inc
+-- source include/have_binlog_format_mixed_or_row.inc
 
 -- connection slave
 -- source include/have_innodb.inc

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test	2008-02-11 14:26:38 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test	2008-12-17 21:07:09 +0000
@@ -6,9 +6,14 @@
 # cluster slave. Due to limitations I have created wrappers
 # to be able to use the same code for all these different
 # test and to have control over the tests.
+#
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+#
 ##############################################################
 -- source include/have_ndb.inc
 -- source include/master-slave.inc
+-- source include/have_binlog_format_mixed_or_row.inc
 
 -- connection slave
 set @@global.slave_exec_mode= 'IDEMPOTENT';

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test	2008-03-10 15:24:12 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test	2008-12-17 21:07:09 +0000
@@ -1,7 +1,9 @@
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
-
-
+--source include/have_binlog_format_mixed_or_row.inc
 
 #
 # Bug #11087

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test	2008-12-17 21:07:09 +0000
@@ -1,9 +1,12 @@
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
+--source include/have_binlog_format_mixed_or_row.inc
 
 #
 # basic test of blob replication for NDB
 #
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
 
 # easy test
 

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test	2008-12-17 21:07:09 +0000
@@ -3,8 +3,13 @@
 # Using wrapper to share test   #
 # code between engine tests     #
 #################################
+#
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+#
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
 let $engine_type=NDBCLUSTER;
 -- source extra/rpl_tests/rpl_row_blob.test
+-- source include/have_binlog_format_mixed_or_row.inc
 

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test	2008-12-17 21:07:09 +0000
@@ -4,7 +4,12 @@
 # Different engines                 #
 # By JBM 2004-02-15                 #
 #####################################
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_commit_after_flush.test
+-- source include/have_binlog_format_mixed_or_row.inc

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test	2007-07-04 21:41:15 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test	2008-12-17 21:07:09 +0000
@@ -2,6 +2,11 @@
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+--source include/have_binlog_format_mixed_or_row.inc
+
 #
 # MySQL Bug#15276: MySQL ignores collation-server
 #

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test	2008-12-17 21:07:09 +0000
@@ -4,5 +4,11 @@
 #########################################
 --source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+--source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_delete_no_where.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test	2008-12-17 21:07:09 +0000
@@ -8,6 +8,11 @@
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+--source include/have_binlog_format_mixed_or_row.inc
+
 --disable_warnings
 DROP DATABASE IF EXISTS replica;
 --enable_warnings

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test	2008-12-17 21:07:09 +0000
@@ -8,6 +8,11 @@
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+--source include/have_binlog_format_mixed_or_row.inc
+
 --disable_warnings
 DROP TABLE IF EXISTS t1, t2;
 --enable_warnings

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test	2008-12-17 21:07:09 +0000
@@ -8,6 +8,13 @@
 ###################################
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_row_func003.test
 -- source include/master-slave-end.inc
+

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test	2008-12-17 21:07:09 +0000
@@ -4,6 +4,11 @@
 -- source include/have_innodb.inc
 -- source include/ndb_master-slave.inc
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 create table t1 (a int, unique(a)) engine=ndbcluster;
 create table t2 (a int, unique(a)) engine=innodb;
 

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test	2008-12-17 21:07:09 +0000
@@ -3,6 +3,12 @@
 #####################################
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 let $engine_type2=myisam;
 -- source extra/rpl_tests/rpl_insert_ignore.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test	2008-12-17 21:07:09 +0000
@@ -4,5 +4,11 @@
 ############################################################
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_multi_update3.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test	2008-12-17 21:07:09 +0000
@@ -9,6 +9,11 @@
 --source include/have_ndb.inc
 --source include/ndb_master-slave.inc
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 --disable_warnings
 DROP DATABASE IF EXISTS replica;
 --enable_warnings

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test	2008-12-17 21:07:09 +0000
@@ -3,5 +3,11 @@
 ########################################################
 --source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_row_001.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test	2008-12-17 21:07:09 +0000
@@ -6,5 +6,11 @@
 #################################
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDBCLUSTER;
 -- source extra/rpl_tests/rpl_row_sp003.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test	2008-12-17 21:07:09 +0000
@@ -6,5 +6,11 @@
 #################################
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDBCLUSTER;
 -- source extra/rpl_tests/rpl_row_sp006.test

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test	2008-03-14 16:45:14 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test	2008-12-17 21:07:09 +0000
@@ -8,6 +8,11 @@ source include/ndb_master-slave.inc;
 source include/have_ndb.inc;
 source include/have_debug.inc;
 
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 CREATE TABLE tmyisam (a int) ENGINE = MYISAM;
 CREATE TABLE tinnodb (a int) ENGINE = INNODB;
 CREATE TABLE tndb (a int) ENGINE = NDB;

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test	2007-09-05 16:44:47 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test	2008-12-17 21:07:09 +0000
@@ -9,6 +9,12 @@
 # Includes
 -- source include/have_ndb.inc
 -- source include/ndb_master-slave.inc
+
+# Since the master generates row-based events, the slave may not be in
+# STATEMENT mode to accept the events.
+
+-- source include/have_binlog_format_mixed_or_row.inc
+
 let $engine_type=NDB;
 -- source extra/rpl_tests/rpl_trig004.test
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2008-10-07 13:21:17 +0000
+++ b/sql/log_event.cc	2008-12-17 21:07:09 +0000
@@ -7039,16 +7039,12 @@ int Rows_log_event::do_apply_event(Relay
     mysql_reset_thd_for_next_command(thd);
 
     /*
-      Check if the slave is set to use SBR.  If so, it should switch
-      to using RBR until the end of the "statement", i.e., next
-      STMT_END_F or next error.
-    */
-    if (!thd->current_stmt_binlog_row_based &&
-        mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG))
-    {
-      thd->set_current_stmt_binlog_row_based();
-    }
-
+      This is a row injection, so we flag the "statement" as
+      such. Note that this code is called both when the slave does row
+      injections and when the BINLOG statement is used to do row
+      injections.
+     */
+    thd->lex->set_stmt_row_injection();
 
     /*
       There are a few flags that are replicated with each row event.

=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt	2008-08-06 14:20:41 +0000
+++ b/sql/share/errmsg.txt	2008-12-17 21:07:09 +0000
@@ -6076,8 +6076,7 @@ ER_SLAVE_INCIDENT
 ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT
         eng "Table has no partition for some existing values"
 ER_BINLOG_UNSAFE_STATEMENT
-        eng "Statement is not safe to log in statement format."
-        swe "Detta �inte s�rt att logga i statement-format."
+        eng "Unsafe statement binlogged as statement since BINLOG_FORMAT is STATEMENT."
 ER_SLAVE_FATAL_ERROR
         eng "Fatal error: %s"
 ER_SLAVE_RELAY_LOG_READ_FAILURE
@@ -6133,3 +6132,15 @@ ER_NEED_REPREPARE
 
 ER_DELAYED_NOT_SUPPORTED  
   eng "DELAYED option not supported for table '%-.192s'"
+ER_BINLOG_NO_ENGINE_CAPABILITY
+  eng "Binary logging not possible since both row-incapable engines and statement-incapable engines are involved"
+ER_BINLOG_NO_ROW_CAPABILITY
+  eng "Cannot inject row in table that uses a storage engine limited to statement-logging"
+ER_BINLOG_NO_ROW_INJECTION
+  eng "Cannot execute row injection since BINLOG_FORMAT = STATEMENT"
+ER_BINLOG_NO_STMT_INJECTION
+  eng "Cannot modify table that uses a storage engine limited to statement-logging when BINLOG_FORMAT = ROW"
+ER_BINLOG_ENGINE_SELF_LOGGING
+  eng "Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging"
+ER_BINLOG_UNSAFE_STATEMENT_ENGINE_LIMITED
+  eng "Unsafe statement binlogged as statement since storage engine is limited to statement-logging."

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2008-10-08 08:46:25 +0000
+++ b/sql/sql_base.cc	2008-12-17 21:07:09 +0000
@@ -5033,48 +5033,90 @@ static void mark_real_tables_as_free_for
 /**
    Decide on logging format to use for the statement.
 
-   Compute the capabilities vector for the involved storage engines
-   and mask out the flags for the binary log. Right now, the binlog
-   flags only include the capabilities of the storage engines, so this
-   is safe.
+   The *capabilities vector* for a table consists of flags to denote
+   what capabilities a table has. Currently, it only include two
+   flags: *row capability flag* and *statement capability flag*.
 
-   We now have three alternatives that prevent the statement from
-   being loggable:
+   The row capability flag is set if the engine can handle row-based
+   logging, and clear otherwise. The same holds for the statement
+   capability flag.
 
-   1. If there are no capabilities left (all flags are clear) it is
-      not possible to log the statement at all, so we roll back the
-      statement and report an error.
+   This function computes the capabilities vector for the involved
+   storage engines and mask out the flags for the binary log. Right
+   now, the binlog flags only include the capabilities of the storage
+   engines.
 
-   2. Statement mode is set, but the capabilities indicate that
-      statement format is not possible.
+   Decision table for logging format
+   ---------------------------------
 
-   3. Row mode is set, but the capabilities indicate that row
-      format is not possible.
+   Row capable       N NNNNNNNNN YYYYYYYYY YYYYYYYYY
+   Statement capable N YYYYYYYYY NNNNNNNNN YYYYYYYYY
 
-   4. Statement is unsafe, but the capabilities indicate that row
-      format is not possible.
+   Statement         * SSSUUUIII SSSUUUIII SSSUUUIII
 
-   If we are in MIXED mode, we then decide what logging format to use:
+   Mode              * SMRSMRSMR SMRSMRSMR SMRSMRSMR
 
-   1. If the statement is unsafe, row-based logging is used.
+   Format (Row/Stmt) - SS-SS---- -RR-RR-RR SRRSRR-RR
+   Warning/Error     7 --4554666 3--3--2-- ---1--2--
 
-   2. If statement-based logging is not possible, row-based logging is
-      used.
+   Legend
+   ------
 
-   3. Otherwise, statement-based logging is used.
+   Statement: (S)afe, (U)nsafe, or row (I)njection
+   Mode:      (S)TATEMENT, (M)IXED, or (R)OW
 
-   @param thd    Client thread
-   @param tables Tables involved in the query
+   Warnings/Errors
+   ---------------
+
+   1. Warning: Unsafe statement logged as statement due to
+      binlog_format = STATEMENT
+
+   2. Error: Cannot execute row injection since binlog_format =
+      STATEMENT
+
+   3. Error: Cannot modify table that uses a storage engine limited to
+      row-logging when binlog_format = STATEMENT
+
+   4. Error: Cannot modify table that uses a storage engine limited to
+      statement-logging when binlog_format = ROW
+
+   5. Warning: Unsafe statement logged as statement since storage
+      engine is limited to statement-logging.
+
+   6. Error: Cannot inject row in table that uses a storage engine
+      limited to statement-logging
+
+   7. Error: Unable to binlog statement since both row-incapable
+      engines and statement-incapable engines are involved.
+
+   For each error case above, the statement is prevented from being
+   logged, we report an error, and roll back the statement.
+
+   @see THD::binlog_query
+
+   @param[in] thd    Client thread
+   @param[in] tables Tables involved in the query
  */
 
 int decide_logging_format(THD *thd, TABLE_LIST *tables)
 {
+#ifndef DBUG_OFF
+  static const char *prelocked_mode_name[] = {
+    "NON_PRELOCKED",
+    "PRELOCKED",
+    "PRELOCKED_UNDER_LOCK_TABLES",
+  };
+#endif
+
   if (mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG))
   {
     handler::Table_flags flags_some_set= handler::Table_flags();
     handler::Table_flags flags_all_set= ~handler::Table_flags();
     my_bool multi_engine= FALSE;
     void* prev_ht= NULL;
+
+    DBUG_PRINT("debug", ("thd->prelocked_mode: %s",
+                         prelocked_mode_name[thd->prelocked_mode]));
     for (TABLE_LIST *table= tables; table; table= table->next_global)
     {
       if (table->placeholder())
@@ -5107,27 +5149,55 @@ int decide_logging_format(THD *thd, TABL
     DBUG_PRINT("info", ("multi_engine: %s",
                         multi_engine ? "TRUE" : "FALSE"));
 
+    thd->set_flags_all_set(flags_all_set);
+
     int error= 0;
-    if (flags_all_set == 0)
+    if (flags_all_set & (HA_BINLOG_STMT_CAPABLE | HA_BINLOG_ROW_CAPABLE) == 0)
     {
-      my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
-               "Statement cannot be logged to the binary log in"
-               " row-based nor statement-based format");
+      /*
+        7. Error: Unable to binlog statement since both row-incapable
+           engines and statement-incapable engines are involved.
+      */
+      my_error((error= ER_BINLOG_NO_ENGINE_CAPABILITY), MYF(0));
     }
-    else if (thd->variables.binlog_format == BINLOG_FORMAT_STMT &&
-             (flags_all_set & HA_BINLOG_STMT_CAPABLE) == 0)
+    else if (thd->lex->is_stmt_row_injection() &&
+             (flags_all_set & HA_BINLOG_ROW_CAPABLE) == 0)
     {
-      my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
-                "Statement-based format required for this statement,"
-                " but not allowed by this combination of engines");
+      /*
+         6. Error: Cannot inject row in table that uses a storage
+            engine limited to statement-logging
+      */
+      my_error((error= ER_BINLOG_NO_ROW_CAPABILITY), MYF(0));
+
+    }
+    else if (thd->lex->is_stmt_row_injection() &&
+             thd->variables.binlog_format == BINLOG_FORMAT_STMT)
+    {
+      /*
+        2. Error: Cannot execute row injection since binlog_format =
+           STATEMENT
+      */
+      my_error((error= ER_BINLOG_NO_ROW_INJECTION), MYF(0),
+               "BINLOG_FORMAT = STATEMENT");
+
     }
-    else if ((thd->variables.binlog_format == BINLOG_FORMAT_ROW ||
-              thd->lex->is_stmt_unsafe()) &&
+    else if (thd->variables.binlog_format == BINLOG_FORMAT_ROW &&
              (flags_all_set & HA_BINLOG_ROW_CAPABLE) == 0)
     {
-      my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
-                "Row-based format required for this statement,"
-                " but not allowed by this combination of engines");
+      /*
+        4. Error: Cannot modify table that uses a storage engine
+           limited to statement-logging when binlog_format = ROW
+      */
+      my_error((error= ER_BINLOG_NO_STMT_INJECTION), MYF(0));
+    }
+    else if (thd->variables.binlog_format == BINLOG_FORMAT_STMT &&
+             (flags_all_set & HA_BINLOG_STMT_CAPABLE) == 0)
+    {
+      /*
+        3. Error: Cannot modify table that uses a storage engine
+           limited to row-logging when binlog_format = STATEMENT
+      */
+      my_error((error= ER_BINLOG_NO_STMT_INJECTION), MYF(0));
     }
 
     /*
@@ -5139,11 +5209,7 @@ int decide_logging_format(THD *thd, TABL
     if (multi_engine &&
         (flags_some_set & HA_HAS_OWN_BINLOGGING))
     {
-      error= ER_BINLOG_LOGGING_IMPOSSIBLE;
-      my_error(error, MYF(0),
-               "Statement cannot be written atomically since more"
-               " than one engine involved and at least one engine"
-               " is self-logging");
+      my_error((error= ER_BINLOG_ENGINE_SELF_LOGGING), MYF(0));
     }
 
     DBUG_PRINT("info", ("error: %d", error));
@@ -5157,14 +5223,11 @@ int decide_logging_format(THD *thd, TABL
 
       1. If the statement is unsafe
       2. If statement format cannot be used
-
-      Observe that point to cannot be decided before the tables
-      involved in a statement has been checked, i.e., we cannot put
-      this code in reset_current_stmt_binlog_row_based(), it has to be
-      here.
+      3. If we are executing a row injection
     */
     if (thd->lex->is_stmt_unsafe() ||
-        (flags_all_set & HA_BINLOG_STMT_CAPABLE) == 0)
+        (flags_all_set & HA_BINLOG_STMT_CAPABLE) == 0 ||
+        thd->lex->is_stmt_row_injection())
     {
       thd->set_current_stmt_binlog_row_based_if_mixed();
     }

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2008-10-08 15:25:24 +0000
+++ b/sql/sql_class.cc	2008-12-17 21:07:09 +0000
@@ -3581,28 +3581,35 @@ show_query_type(THD::enum_binlog_query_t
 #endif
 
 
-/*
-  Member function that will log query, either row-based or
-  statement-based depending on the value of the 'current_stmt_binlog_row_based'
-  the value of the 'qtype' flag.
+/**
+  Member function that will log query.
+
+  The query will be logged in either row format or statement format
+  depending on the value of the value of @c
+  current_stmt_binlog_row_based field and the value of the @c qtype
+  parameter.
 
   This function should be called after the all calls to ha_*_row()
   functions have been issued, but before tables are unlocked and
   closed.
 
-  OBSERVE
-    There shall be no writes to any system table after calling
-    binlog_query(), so these writes has to be moved to before the call
-    of binlog_query() for correct functioning.
-
-    This is necessesary not only for RBR, but the master might crash
-    after binlogging the query but before changing the system tables.
-    This means that the slave and the master are not in the same state
-    (after the master has restarted), so therefore we have to
-    eliminate this problem.
+  @see decide_logging_format
+
+  @attention There shall be no writes to any system table after
+  calling @c binlog_query(), so these writes has to be moved to before
+  the call of @c binlog_query() for correct functioning.  This was a
+  problem with some statements previously, and have now been corrected
+  so that @c binlog_query() is only followed by unlock tables and
+  commito or rollback transaction.
+
+  @par The restriction above is not only for row-based replication,
+  but is also necessary for statement-based replication. The reasons
+  is that the master might crash after binlogging the query but before
+  changing the system tables.  This means that the slave and the
+  master are not in the same state (after the master has restarted),
+  so therefore we have to eliminate this problem.
 
-  RETURN VALUE
-    Error code, or 0 if no error.
+  @return Error code, or 0 if no error.
 */
 int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
                       ulong query_len, bool is_trans, bool suppress_use,
@@ -3627,23 +3634,48 @@ int THD::binlog_query(THD::enum_binlog_q
       DBUG_RETURN(error);
 
   /*
-    If we are in statement mode and trying to log an unsafe statement,
-    we should print a warning.
+    There are two warnings that are printed here instead of in
+    decide_logging_format(). We choose this since the warnings should
+    be printed only if the statement is actually logged and when
+    executing decide_logging_format() we only know that the binary log
+    is open and some information about the statement. At that point,
+    we cannot know for sure that this function will be called.
   */
-  if (lex->is_stmt_unsafe() &&
-      variables.binlog_format == BINLOG_FORMAT_STMT)
+  if (lex->is_stmt_unsafe())
   {
-    DBUG_ASSERT(this->query != NULL);
-    push_warning(this, MYSQL_ERROR::WARN_LEVEL_WARN,
-                 ER_BINLOG_UNSAFE_STATEMENT,
-                 ER(ER_BINLOG_UNSAFE_STATEMENT));
-    if (!(binlog_flags & BINLOG_FLAG_UNSAFE_STMT_PRINTED))
+    int error= 0;
+    if (variables.binlog_format == BINLOG_FORMAT_STMT)
+    {
+      /*
+        1. Warning: Unsafe statement logged as statement since
+        binlog_format = STATEMENT
+      */
+      error= ER_BINLOG_UNSAFE_STATEMENT;
+    }
+    else if ((flags_all_set() & HA_BINLOG_ROW_CAPABLE) == 0)
+    {
+      /*
+        5. Warning: Unsafe statement logged as statement since storage
+        engine is limited to statement-logging.
+      */
+      error= ER_BINLOG_UNSAFE_STATEMENT_ENGINE_LIMITED;
+    }
+
+    if (error)
     {
       char warn_buf[MYSQL_ERRMSG_SIZE];
-      my_snprintf(warn_buf, MYSQL_ERRMSG_SIZE, "%s Statement: %s",
-                  ER(ER_BINLOG_UNSAFE_STATEMENT), this->query);
-      sql_print_warning(warn_buf);
-      binlog_flags|= BINLOG_FLAG_UNSAFE_STMT_PRINTED;
+      size_t len;
+      len= my_snprintf(warn_buf, MYSQL_ERRMSG_SIZE, ER(error));
+      push_warning(this, MYSQL_ERROR::WARN_LEVEL_WARN, error, warn_buf);
+
+      if (!(binlog_flags & BINLOG_FLAG_UNSAFE_STMT_PRINTED))
+      {
+        DBUG_ASSERT(this->query != NULL);
+        my_snprintf(warn_buf + len, MYSQL_ERRMSG_SIZE,
+                    " Statement: %s", this->query);
+        sql_print_warning(warn_buf);
+        binlog_flags|= BINLOG_FLAG_UNSAFE_STMT_PRINTED;
+      }
     }
   }
 

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2008-10-09 10:39:42 +0000
+++ b/sql/sql_class.h	2008-12-17 21:07:09 +0000
@@ -2210,7 +2210,27 @@ public:
   */
   void pop_internal_handler();
 
+  /**
+     Set intersection of all table flags.
+   */
+  void set_flags_all_set(handler::Table_flags flags) {
+    m_flags_all_set= flags;
+  }
+
+
+  /**
+     Get intersection of all table flags computed in
+     @c decide_logging_format().
+
+     @see decide_logging_format()
+   */
+  handler::Table_flags get_flags_all_set() const {
+    return m_flags_all_set;
+  }
+
 private:
+  handler::Table_flags m_flags_all_set;
+
   /** The current internal error handler for this thread, or NULL. */
   Internal_error_handler *m_internal_handler;
   /**

=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h	2008-10-07 21:52:49 +0000
+++ b/sql/sql_lex.h	2008-12-17 21:07:09 +0000
@@ -1036,6 +1036,13 @@ public:
   }
 
   /**
+     Is this statement actually a row injection?
+   */
+  inline bool is_stmt_row_injection() const {
+    return binlog_stmt_flags & (1U << BINLOG_STMT_FLAG_ROW_INJECTION);
+  }
+
+  /**
      Flag the current (top-level) statement as unsafe.
 
      The flag will be reset after the statement has finished.
@@ -1049,6 +1056,14 @@ public:
     binlog_stmt_flags&= ~(1U << BINLOG_STMT_FLAG_UNSAFE);
   }
 
+  inline void set_stmt_row_injection() {
+    binlog_stmt_flags|= (1U << BINLOG_STMT_FLAG_ROW_INJECTION);
+  }
+
+  inline void clear_stmt_row_injection() {
+    binlog_stmt_flags|= (1U << BINLOG_STMT_FLAG_ROW_INJECTION);
+  }
+
   /**
     true if the parsed tree contains references to stored procedures
     or functions, false otherwise
@@ -1059,6 +1074,7 @@ public:
 private:
   enum enum_binlog_stmt_flag {
     BINLOG_STMT_FLAG_UNSAFE,
+    BINLOG_STMT_FLAG_ROW_INJECTION,
     BINLOG_STMT_FLAG_COUNT
   };
 

Thread
bzr commit into mysql-5.1 branch (mats:2771) Bug#39934Mats Kindahl17 Dec
  • Re: bzr commit into mysql-5.1 branch (mats:2771) Bug#39934Sven Sandberg1 Jan
    • Re: bzr commit into mysql-5.1 branch (mats:2771) Bug#39934Mats Kindahl13 Jan