diff --git a/.bzrignore b/.bzrignore index 55f55faa0e6..00a11761207 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2957,3 +2957,10 @@ win/vs8cache.txt zlib/*.ds? zlib/*.vcproj client/rpl_constants.h +client/log_event_old.cc +client/log_event_old.h +client/rpl_record_old.cc +client/rpl_record_old.h +libmysqld/log_event_old.cc +libmysqld/rpl_record.cc +libmysqld/rpl_record_old.cc diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index 5dd272c562d..7377b4a0fed 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -1,5 +1,5 @@ --let $binlog_start=106 --replace_result $binlog_start ---replace_column 2 # 5 # +--replace_column 2 # 4 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start diff --git a/mysql-test/include/show_binlog_events2.inc b/mysql-test/include/show_binlog_events2.inc new file mode 100644 index 00000000000..234b7e06fcf --- /dev/null +++ b/mysql-test/include/show_binlog_events2.inc @@ -0,0 +1,9 @@ +# +# Differs slightly from show_binlog events in showing server_id +# which is important for some tests +# +--let $binlog_start=106 +--replace_result $binlog_start +--replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +--eval show binlog events from $binlog_start diff --git a/mysql-test/r/rpl_ndb_dd_basic.result b/mysql-test/r/rpl_ndb_dd_basic.result index 245be1cc0a9..f1cc6e9af24 100644 --- a/mysql-test/r/rpl_ndb_dd_basic.result +++ b/mysql-test/r/rpl_ndb_dd_basic.result @@ -34,33 +34,33 @@ pk1 b c 1 2 3 show binlog events from ; 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 # # CREATE LOGFILE GROUP lg1 +master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=NDB -master-bin.000001 # Query # # alter logfile group lg1 +master-bin.000001 # Query 1 # alter logfile group lg1 add undofile 'undofile02.dat' initial_size 4M engine=ndb -master-bin.000001 # Query # # CREATE TABLESPACE ts1 +master-bin.000001 # Query 1 # CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 12M ENGINE NDB -master-bin.000001 # Query # # alter tablespace ts1 +master-bin.000001 # Query 1 # alter tablespace ts1 add datafile 'datafile02.dat' initial_size 4M engine=ndb -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (pk1 int not null primary key, b int not null, c int not null) tablespace ts1 storage disk engine ndb -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT drop table t1; alter tablespace ts1 drop datafile 'datafile.dat' diff --git a/mysql-test/t/ndb_binlog_ddl_multi.test b/mysql-test/t/ndb_binlog_ddl_multi.test index 064bd88764a..487dfbf16e5 100644 --- a/mysql-test/t/ndb_binlog_ddl_multi.test +++ b/mysql-test/t/ndb_binlog_ddl_multi.test @@ -31,10 +31,10 @@ create table t1 (a int primary key) engine=ndb; --connection server2 create table t2 (a int primary key) engine=ndb; ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc --connection server1 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc # alter table --connection server1 @@ -46,7 +46,7 @@ reset master; alter table t2 add column (b int); --connection server1 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc # alter database --connection server1 @@ -64,10 +64,10 @@ ALTER DATABASE mysqltest CHARACTER SET latin1; drop table mysqltest.t1; --connection server1 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc # to track down bug#18976 --real_sleep 10 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc #--connection server2 #drop table mysqltest.t1; @@ -85,7 +85,7 @@ drop database mysqltest; create table t1 (a int primary key) engine=ndb; --connection server2 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc --connection server2 drop table t2; @@ -137,10 +137,10 @@ ENGINE =NDB; #drop table t1; --connection server2 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc # to track down bug#18976 --real_sleep 10 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc drop table t1; @@ -161,7 +161,7 @@ create table t2 (a int key) engine=ndb; create table t3 (a int key) engine=ndb; rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; --connection server2 ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc drop table t1; drop table t2; @@ -188,4 +188,4 @@ insert into t2 values(2); # prior to bug fix, data was missing for t2 --connection server2 drop table t2; ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc diff --git a/mysql-test/t/ndb_binlog_discover.test b/mysql-test/t/ndb_binlog_discover.test index 7cd817f81b9..999079ad29c 100644 --- a/mysql-test/t/ndb_binlog_discover.test +++ b/mysql-test/t/ndb_binlog_discover.test @@ -29,8 +29,8 @@ while ($mysql_errno) } --enable_query_log ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc PURGE MASTER LOGS TO 'master-bin.000002'; ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc drop table t1; diff --git a/mysql-test/t/ndb_binlog_log_bin.test b/mysql-test/t/ndb_binlog_log_bin.test index 353041df5bf..b2dbaa797b6 100644 --- a/mysql-test/t/ndb_binlog_log_bin.test +++ b/mysql-test/t/ndb_binlog_log_bin.test @@ -25,13 +25,13 @@ create table t2 (a int key, b int) engine=ndb; insert into t1 values (1,1); alter table t1 add c int; # we should not see it in the local server --- source include/show_binlog_events.inc +-- source include/show_binlog_events2.inc reset master; # we should not see it in another server connection server2; use mysqltest; insert into t2 values (1,1); --- source include/show_binlog_events.inc +-- source include/show_binlog_events2.inc reset master; # but if you do stuff in "default" client setting connection con1; @@ -41,10 +41,10 @@ drop table t2; create table t1 (d int key, e int) engine=ndb; create table t2 (d int key, e int) engine=ndb; insert into t1 values (1,1); --- source include/show_binlog_events.inc +-- source include/show_binlog_events2.inc # and in another server connection server2; use mysqltest; insert into t2 values (1,1); --- source include/show_binlog_events.inc +-- source include/show_binlog_events2.inc drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_multi.test b/mysql-test/t/ndb_binlog_multi.test index 1f04787e27c..c227c7fec93 100644 --- a/mysql-test/t/ndb_binlog_multi.test +++ b/mysql-test/t/ndb_binlog_multi.test @@ -34,7 +34,7 @@ CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; # insert something on server2 INSERT INTO t2 VALUES (1,1),(2,2); # verify that we get the data in the binlog ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc select * from t2 order by a; --replace_column 1 SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM @@ -47,7 +47,7 @@ SELECT * FROM t2 ORDER BY a; # doing drop table will ensure that all the events have been received DROP TABLE t2; # verify thar we have table and data in binlog ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc --replace_result $the_epoch eval SELECT inserts,updates,deletes,schemaops FROM mysql.ndb_binlog_index WHERE epoch=$the_epoch; @@ -62,7 +62,7 @@ reset master; connection server2; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; INSERT INTO t1 VALUES (1),(2); ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc --replace_column 1 SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; @@ -77,7 +77,7 @@ connection server2; # doing drop table will ensure that all the events have been received drop table t1; # verify thar we have table and data in binlog ---source include/show_binlog_events.inc +--source include/show_binlog_events2.inc --replace_result $the_epoch $the_epoch2 eval SELECT inserts,updates,deletes,schemaops FROM mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/t/rpl_ndb_dd_basic.test b/mysql-test/t/rpl_ndb_dd_basic.test index 104be91e6e4..7387d39db87 100644 --- a/mysql-test/t/rpl_ndb_dd_basic.test +++ b/mysql-test/t/rpl_ndb_dd_basic.test @@ -67,7 +67,7 @@ select * from t1 order by pk1; # --connection master --- source include/show_binlog_events.inc +-- source include/show_binlog_events2.inc # # cleanup