revert back to old show_binlog_events asto many test failures, and create a...

revert back to old show_binlog_events asto many test failures, and create a show_binlog_events2 instead
parent 9afbeeed
...@@ -2957,3 +2957,10 @@ win/vs8cache.txt ...@@ -2957,3 +2957,10 @@ win/vs8cache.txt
zlib/*.ds? zlib/*.ds?
zlib/*.vcproj zlib/*.vcproj
client/rpl_constants.h 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
--let $binlog_start=106 --let $binlog_start=106
--replace_result $binlog_start <binlog_start> --replace_result $binlog_start <binlog_start>
--replace_column 2 # 5 # --replace_column 2 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
--eval show binlog events from $binlog_start --eval show binlog events from $binlog_start
#
# Differs slightly from show_binlog events in showing server_id
# which is important for some tests
#
--let $binlog_start=106
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
--eval show binlog events from $binlog_start
...@@ -34,33 +34,33 @@ pk1 b c ...@@ -34,33 +34,33 @@ pk1 b c
1 2 3 1 2 3
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info 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 1 # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query # # CREATE LOGFILE GROUP lg1 master-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat' ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M UNDO_BUFFER_SIZE = 1M
ENGINE=NDB ENGINE=NDB
master-bin.000001 # Query # # alter logfile group lg1 master-bin.000001 # Query 1 # alter logfile group lg1
add undofile 'undofile02.dat' add undofile 'undofile02.dat'
initial_size 4M engine=ndb initial_size 4M engine=ndb
master-bin.000001 # Query # # CREATE TABLESPACE ts1 master-bin.000001 # Query 1 # CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat' ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1 USE LOGFILE GROUP lg1
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE NDB ENGINE NDB
master-bin.000001 # Query # # alter tablespace ts1 master-bin.000001 # Query 1 # alter tablespace ts1
add datafile 'datafile02.dat' add datafile 'datafile02.dat'
initial_size 4M engine=ndb 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) (pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk tablespace ts1 storage disk
engine ndb engine ndb
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query 1 # COMMIT
drop table t1; drop table t1;
alter tablespace ts1 alter tablespace ts1
drop datafile 'datafile.dat' drop datafile 'datafile.dat'
......
...@@ -31,10 +31,10 @@ create table t1 (a int primary key) engine=ndb; ...@@ -31,10 +31,10 @@ create table t1 (a int primary key) engine=ndb;
--connection server2 --connection server2
create table t2 (a int primary key) engine=ndb; create table t2 (a int primary key) engine=ndb;
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
--connection server1 --connection server1
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
# alter table # alter table
--connection server1 --connection server1
...@@ -46,7 +46,7 @@ reset master; ...@@ -46,7 +46,7 @@ reset master;
alter table t2 add column (b int); alter table t2 add column (b int);
--connection server1 --connection server1
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
# alter database # alter database
--connection server1 --connection server1
...@@ -64,10 +64,10 @@ ALTER DATABASE mysqltest CHARACTER SET latin1; ...@@ -64,10 +64,10 @@ ALTER DATABASE mysqltest CHARACTER SET latin1;
drop table mysqltest.t1; drop table mysqltest.t1;
--connection server1 --connection server1
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
# to track down bug#18976 # to track down bug#18976
--real_sleep 10 --real_sleep 10
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
#--connection server2 #--connection server2
#drop table mysqltest.t1; #drop table mysqltest.t1;
...@@ -85,7 +85,7 @@ drop database mysqltest; ...@@ -85,7 +85,7 @@ drop database mysqltest;
create table t1 (a int primary key) engine=ndb; create table t1 (a int primary key) engine=ndb;
--connection server2 --connection server2
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
--connection server2 --connection server2
drop table t2; drop table t2;
...@@ -137,10 +137,10 @@ ENGINE =NDB; ...@@ -137,10 +137,10 @@ ENGINE =NDB;
#drop table t1; #drop table t1;
--connection server2 --connection server2
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
# to track down bug#18976 # to track down bug#18976
--real_sleep 10 --real_sleep 10
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
drop table t1; drop table t1;
...@@ -161,7 +161,7 @@ create table t2 (a int key) engine=ndb; ...@@ -161,7 +161,7 @@ create table t2 (a int key) engine=ndb;
create table t3 (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; rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1;
--connection server2 --connection server2
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
drop table t1; drop table t1;
drop table t2; drop table t2;
...@@ -188,4 +188,4 @@ insert into t2 values(2); ...@@ -188,4 +188,4 @@ insert into t2 values(2);
# prior to bug fix, data was missing for t2 # prior to bug fix, data was missing for t2
--connection server2 --connection server2
drop table t2; drop table t2;
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
...@@ -29,8 +29,8 @@ while ($mysql_errno) ...@@ -29,8 +29,8 @@ while ($mysql_errno)
} }
--enable_query_log --enable_query_log
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
PURGE MASTER LOGS TO 'master-bin.000002'; PURGE MASTER LOGS TO 'master-bin.000002';
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
drop table t1; drop table t1;
...@@ -25,13 +25,13 @@ create table t2 (a int key, b int) engine=ndb; ...@@ -25,13 +25,13 @@ create table t2 (a int key, b int) engine=ndb;
insert into t1 values (1,1); insert into t1 values (1,1);
alter table t1 add c int; alter table t1 add c int;
# we should not see it in the local server # we should not see it in the local server
-- source include/show_binlog_events.inc -- source include/show_binlog_events2.inc
reset master; reset master;
# we should not see it in another server # we should not see it in another server
connection server2; connection server2;
use mysqltest; use mysqltest;
insert into t2 values (1,1); insert into t2 values (1,1);
-- source include/show_binlog_events.inc -- source include/show_binlog_events2.inc
reset master; reset master;
# but if you do stuff in "default" client setting # but if you do stuff in "default" client setting
connection con1; connection con1;
...@@ -41,10 +41,10 @@ drop table t2; ...@@ -41,10 +41,10 @@ drop table t2;
create table t1 (d int key, e int) engine=ndb; create table t1 (d int key, e int) engine=ndb;
create table t2 (d int key, e int) engine=ndb; create table t2 (d int key, e int) engine=ndb;
insert into t1 values (1,1); insert into t1 values (1,1);
-- source include/show_binlog_events.inc -- source include/show_binlog_events2.inc
# and in another server # and in another server
connection server2; connection server2;
use mysqltest; use mysqltest;
insert into t2 values (1,1); insert into t2 values (1,1);
-- source include/show_binlog_events.inc -- source include/show_binlog_events2.inc
drop database mysqltest; drop database mysqltest;
...@@ -34,7 +34,7 @@ CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; ...@@ -34,7 +34,7 @@ CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB;
# insert something on server2 # insert something on server2
INSERT INTO t2 VALUES (1,1),(2,2); INSERT INTO t2 VALUES (1,1),(2,2);
# verify that we get the data in the binlog # 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; select * from t2 order by a;
--replace_column 1 <the_epoch> --replace_column 1 <the_epoch>
SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM
...@@ -47,7 +47,7 @@ SELECT * FROM t2 ORDER BY a; ...@@ -47,7 +47,7 @@ SELECT * FROM t2 ORDER BY a;
# doing drop table will ensure that all the events have been received # doing drop table will ensure that all the events have been received
DROP TABLE t2; DROP TABLE t2;
# verify thar we have table and data in binlog # 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_epoch> --replace_result $the_epoch <the_epoch>
eval SELECT inserts,updates,deletes,schemaops FROM eval SELECT inserts,updates,deletes,schemaops FROM
mysql.ndb_binlog_index WHERE epoch=$the_epoch; mysql.ndb_binlog_index WHERE epoch=$the_epoch;
...@@ -62,7 +62,7 @@ reset master; ...@@ -62,7 +62,7 @@ reset master;
connection server2; connection server2;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB;
INSERT INTO t1 VALUES (1),(2); INSERT INTO t1 VALUES (1),(2);
--source include/show_binlog_events.inc --source include/show_binlog_events2.inc
--replace_column 1 <the_epoch2> --replace_column 1 <the_epoch2>
SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM
mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
...@@ -77,7 +77,7 @@ connection server2; ...@@ -77,7 +77,7 @@ connection server2;
# doing drop table will ensure that all the events have been received # doing drop table will ensure that all the events have been received
drop table t1; drop table t1;
# verify thar we have table and data in binlog # 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_epoch> $the_epoch2 <the_epoch2> --replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
eval SELECT inserts,updates,deletes,schemaops FROM eval SELECT inserts,updates,deletes,schemaops FROM
mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2;
...@@ -67,7 +67,7 @@ select * from t1 order by pk1; ...@@ -67,7 +67,7 @@ select * from t1 order by pk1;
# #
--connection master --connection master
-- source include/show_binlog_events.inc -- source include/show_binlog_events2.inc
# #
# cleanup # cleanup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment