summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-04-18 23:08:56 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-04-18 23:08:56 +0200
commit4cb86e6e2e0a3c658a6329bdf2913de1c34af10b (patch)
treee605fa01f0e3344e85b7b86fabffcdd94b408a01 /mysql-test
parent852bac883ff9c0f274a0226c665647cfe6b4b85b (diff)
downloadmariadb-git-4cb86e6e2e0a3c658a6329bdf2913de1c34af10b.tar.gz
revert back to old show_binlog_events asto many test failures, and create a show_binlog_events2 instead
BitKeeper/etc/ignore: Added 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 to the ignore list mysql-test/include/show_binlog_events2.inc: New BitKeeper file ``mysql-test/include/show_binlog_events2.inc''
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/show_binlog_events.inc2
-rw-r--r--mysql-test/include/show_binlog_events2.inc9
-rw-r--r--mysql-test/r/rpl_ndb_dd_basic.result24
-rw-r--r--mysql-test/t/ndb_binlog_ddl_multi.test20
-rw-r--r--mysql-test/t/ndb_binlog_discover.test4
-rw-r--r--mysql-test/t/ndb_binlog_log_bin.test8
-rw-r--r--mysql-test/t/ndb_binlog_multi.test8
-rw-r--r--mysql-test/t/rpl_ndb_dd_basic.test2
8 files changed, 43 insertions, 34 deletions
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 <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 <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 <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 # # 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 <the_epoch>
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 <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 <the_epoch2>
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_epoch> $the_epoch2 <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