4542 Frazer Clement 2011-09-21
Fix hardcoded offsets in testcase
modified:
mysql-test/suite/binlog/t/binlog_killed.test
4541 Frazer Clement 2011-09-21
WL5353 : Implement v2 of Binlog row events
WL5353 introduced a new optional Binlog row event format
containing 'extra row information'. This is used to transfer row
transaction ids. The addition of extra row information was not
backwards compatible, so it was possible for user error to result in
a Slave crash for example.
To ensure that inadvertant use of the new row event format does
not cause any problems, this patch modifies the row event ids, so that
old Slaves which do not understand the new format will not attempt to
process the events.
To ensure that online upgrades are possible, a new MySQLD option is added.
--log-bin-use-v1-row-events=1 will cause MySQLD to use the original
'v1' Binlog row events, which older slaves will understand.
--log-bin-use-v1-row-events=0 will cause MySQLD to use the new
'v2' Binlog row events, which are capable of carrying row transaction
ids.
The --ndb-log-transaction-id option can only be set to on when v2
row events are being generated, e.g. when --log-bin-use-v1-row-events=0.
By default, mysql-5.1-telco-7.0 and mysql-5.1-telco-7.1 generate v1
row events (--log-bin-use-v1-row-events=1). mysql-5.5-cluster (7.2)
generates v2 events (--log-bin-use-v1-row-events=0). This implies
that row based replication from a mysql-5.5-cluster Master to an
old mysql-5.1-telco-7.[0|1] Slave will not work, unless the mysql-5.5-cluster
Master has --log-bin-use-v1-row-events=1 set explicitly.
Note that this option is only required for replicating to _old_ servers,
without support for v2 Binlog events.
added:
mysql-test/include/have_binlog_row_v2.inc
mysql-test/r/have_binlog_row_v2.require
modified:
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
mysql-test/include/show_binlog_events2.inc
mysql-test/include/show_binlog_using_logname.inc
mysql-test/r/ctype_cp932_binlog_stm.result
mysql-test/r/flush2.result
mysql-test/r/sp_trans_log.result
mysql-test/suite/binlog/r/binlog_database.result
mysql-test/suite/binlog/r/binlog_innodb.result
mysql-test/suite/binlog/r/binlog_innodb_row.result
mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result
mysql-test/suite/binlog/r/binlog_mixed_load_data.result
mysql-test/suite/binlog/r/binlog_multi_engine.result
mysql-test/suite/binlog/r/binlog_row_binlog.result
mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
mysql-test/suite/binlog/r/binlog_row_insert_select.result
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_stm_binlog.result
mysql-test/suite/binlog/r/binlog_stm_row.result
mysql-test/suite/binlog/t/binlog_incident.test
mysql-test/suite/binlog/t/binlog_killed_simulate.test
mysql-test/suite/ndb/r/ndb_discover_db.result
mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result
mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result
mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result
mysql-test/suite/ndb_binlog/r/ndb_binlog_multi.result
mysql-test/suite/ndb_binlog/r/ndb_binlog_restore.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_circular.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_basic.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_multi.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_lsu_anyval.result
mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_restart.result
mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb.result
mysql-test/suite/ndb_rpl/r/rpl_truncate_7ndb_2.result
mysql-test/suite/ndb_rpl/t/ndb_rpl_gap_event.test
mysql-test/suite/ndb_rpl/t/ndb_rpl_multi.test
mysql-test/suite/ndb_rpl/t/ndb_rpl_skip_gap_event.test
mysql-test/suite/ndb_rpl/t/ndb_rpl_slave_restart.test
mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
mysql-test/suite/rpl/r/rpl_row_conflicts.result
mysql-test/suite/rpl/r/rpl_row_log.result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
mysql-test/suite/rpl/r/rpl_slave_skip.result
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
mysql-test/suite/rpl/t/rpl_extra_row_data.test
mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test
mysql-test/t/ctype_cp932_binlog_stm.test
mysql-test/t/mysqlbinlog2.test
sql/ha_ndbcluster_binlog.cc
sql/log_event.cc
sql/log_event.h
sql/log_event_old.h
sql/mysql_priv.h
sql/mysqld.cc
sql/rpl_constants.h
sql/rpl_injector.cc
sql/rpl_injector.h
sql/set_var.cc
sql/sql_class.cc
sql/sql_class.h
=== modified file 'mysql-test/suite/binlog/t/binlog_killed.test'
--- a/mysql-test/suite/binlog/t/binlog_killed.test 2010-10-12 11:54:35 +0000
+++ b/mysql-test/suite/binlog/t/binlog_killed.test 2011-09-21 13:02:52 +0000
@@ -51,7 +51,7 @@ reap;
let $rows= `select count(*) from t2 /* must be 2 or 0 */`;
let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MYSQL_BINLOG --force-if-open --start-position=135 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=140 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog"))
@@ -262,7 +262,7 @@ source include/show_binlog_events.inc;
# a proof the query is binlogged with an error
---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=112 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
@@ -308,7 +308,7 @@ source include/show_binlog_events.inc;
# a proof the query is binlogged with an error
---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=112 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (frazer.clement:4541 to 4542) | Frazer Clement | 22 Sep |