summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-06-21 13:19:24 -0600
committerunknown <sasha@mysql.sashanet.com>2001-06-21 13:19:24 -0600
commit5eefda7a8504d01c0dba8304a0ff3f0fd2910c2c (patch)
treee0d3ffc83959f6562326765b3d79c7915f033bbf /mysql-test
parent4564c64a00693a27d7bd5d4d66d67c9eccbcac2a (diff)
downloadmariadb-git-5eefda7a8504d01c0dba8304a0ff3f0fd2910c2c.tar.gz
added SHOW BINLOG EVENTS
fixed log sequence bugs fixed bugs in handling Slave event added test case with SHOW BINLOG EVENTS have not fixed all the bugs - found some that are also in 3.23, will fix them there first, then do pull and cleanup will not push this changeset include/mysqld_error.h: new error mysql-test/mysql-test-run.sh: use quotes in expr sql/lex.h: SHOW BINLOG EVENTS sql/log.cc: fixed log sequence bugs sql/log_event.cc: SHOW BINLOG EVENTS fixed bugs Slave event handling sql/log_event.h: SHOW BINLOG EVENTS sql/share/english/errmsg.txt: SHOW BINLOG EVENTS sql/sql_lex.h: SHOW BINLOG EVENTS sql/sql_parse.cc: SHOW BINLOG EVENTS sql/sql_repl.cc: SHOW BINLOG EVENTS sql/sql_repl.h: SHOW BINLOG EVENTS sql/sql_yacc.yy: SHOW BINLOG EVENTS
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh2
-rw-r--r--mysql-test/r/rpl_log.result51
-rw-r--r--mysql-test/t/rpl_log.test27
3 files changed, 79 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index f8916403738..472aa60ffa1 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -659,7 +659,7 @@ run_testcase ()
slave_master_info_file=$TESTDIR/$tname-slave-master-info.opt
SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0`
if [ -n $SKIP_TEST ] ; then
- SKIP_THIS_TEST=`$EXPR \( $tname : $SKIP_TEST \) != 0`
+ SKIP_THIS_TEST=`$EXPR \( $tname : '$SKIP_TEST' \) != 0`
if [ x$SKIP_THIS_TEST = x1 ] ;
then
return;
diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result
new file mode 100644
index 00000000000..c6345b6b9fb
--- /dev/null
+++ b/mysql-test/r/rpl_log.result
@@ -0,0 +1,51 @@
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.001 4 Start 1 1 Server ver: 4.0.0-debug-log, Binlog ver: 2
+master-bin.001 79 Query 1 2 use test; create table t1(n int not null auto_increment primary key)
+master-bin.001 172 Intvar 1 3 INSERT_ID=1
+master-bin.001 200 Query 1 4 use test; insert into t1 values (NULL)
+master-bin.001 263 Query 1 5 use test; drop table t1
+master-bin.001 311 Query 1 6 use test; create table t1 (word char(20) not null)
+master-bin.001 386 Load 1 7 use test; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 FIELDS TERMINATED BY '\t' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
+master-bin.001 468 Query 1 8 use test; drop table t1
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.001 79 Query 1 2 use test; create table t1(n int not null auto_increment primary key)
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.001 79 Query 1 2 use test; create table t1(n int not null auto_increment primary key)
+master-bin.001 172 Intvar 1 3 INSERT_ID=1
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.001 200 Query 1 4 use test; insert into t1 values (NULL)
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.001 4 Start 1 1 Server ver: 4.0.0-debug-log, Binlog ver: 2
+master-bin.001 79 Query 1 2 use test; create table t1(n int not null auto_increment primary key)
+master-bin.001 172 Intvar 1 3 INSERT_ID=1
+master-bin.001 200 Query 1 4 use test; insert into t1 values (NULL)
+master-bin.001 263 Query 1 5 use test; drop table t1
+master-bin.001 311 Query 1 6 use test; create table t1 (word char(20) not null)
+master-bin.001 386 Load 1 7 use test; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 FIELDS TERMINATED BY '\t' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
+master-bin.001 468 Query 1 8 use test; drop table t1
+master-bin.001 516 Rotate 1 9 master-bin.002
+master-bin.001 549 Stop 1 10
+Log_name Pos Event_type Server_id Log_seq Info
+master-bin.002 4 Start 1 1 Server ver: 4.0.0-debug-log, Binlog ver: 2
+Log_name
+slave-bin.001
+slave-bin.002
+slave-bin.003
+slave-bin.004
+Log_name Pos Event_type Server_id Log_seq Info
+slave-bin.001 4 Start 2 1 Server ver: 4.0.0-debug-log, Binlog ver: 2
+slave-bin.001 79 Slave 2 2
+slave-bin.001 118 Rotate 2 3 slave-bin.002
+slave-bin.001 150 Stop 2 4
+Log_name Pos Event_type Server_id Log_seq Info
+slave-bin.002 4 Start 2 1 Server ver: 4.0.0-debug-log, Binlog ver: 2
+slave-bin.002 79 Slave 1 2
+slave-bin.002 132 Slave 1 3
+slave-bin.002 185 Query 1 4 use test; create table t1(n int not null auto_increment primary key)
+slave-bin.002 278 Intvar 2 5 INSERT_ID=1
+slave-bin.002 306 Query 1 6 use test; insert into t1 values (NULL)
+slave-bin.002 369 Query 1 7 use test; drop table t1
+slave-bin.002 417 Query 1 8 use test; create table t1 (word char(20) not null)
+slave-bin.002 492 Query 1 9 use test; drop table t1
+slave-bin.002 540 Rotate 2 10 slave-bin.003
+slave-bin.002 572 Stop 2 11
diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test
new file mode 100644
index 00000000000..08e6f687cd8
--- /dev/null
+++ b/mysql-test/t/rpl_log.test
@@ -0,0 +1,27 @@
+source include/master-slave.inc;
+
+#clean up slave binlogs
+connection slave;
+reset master;
+
+connection master;
+drop table if exists t1;
+create table t1(n int not null auto_increment primary key);
+insert into t1 values (NULL);
+drop table t1;
+create table t1 (word char(20) not null);
+load data infile '../../std_data/words.dat' into table t1;
+drop table t1;
+show binlog events;
+show binlog events from 79 limit 1;
+show binlog events from 79 limit 2;
+show binlog events from 79 limit 2,1;
+flush logs;
+show binlog events;
+show binlog events in 'master-bin.002';
+save_master_pos;
+connection slave;
+sync_with_master;
+show master logs;
+show binlog events in 'slave-bin.001' from 4;
+show binlog events in 'slave-bin.002' from 4;