summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-06-23 19:37:24 -0600
committerunknown <sasha@mysql.sashanet.com>2001-06-23 19:37:24 -0600
commitbcc51cb0a3d9fcf4e02ac2201a0a0a5a5538f17f (patch)
treed6cc479d4e3c59cd207caf465ed545d6dd6e1cc2 /mysql-test
parenta697e30a3aa928d6896a45af4b762737d6906022 (diff)
downloadmariadb-git-bcc51cb0a3d9fcf4e02ac2201a0a0a5a5538f17f.tar.gz
show master forced rotate info in SHOW BINLOG EVENTS
mark a master-forced rotate with a special flag mysql-test/r/rpl000014.result: updated result mysql-test/r/rpl000015.result: updated result mysql-test/r/rpl000016.result: updated result mysql-test/r/rpl_log.result: updated result mysql-test/t/rpl000017-slave.sh: fix for change in master.info format mysql-test/t/rpl_log.test: test for correct last_log_seq in show slave status sql/log.cc: mark a master-forced rotate with a special flag sql/log_event.cc: show master forced rotate info in SHOW BINLOG EVENTS sql/log_event.h: master forced rotation flag sql/slave.cc: keep trace of last log sequences in MASTER_INFO do not rotate on slave, if the rotation on master was forced by its master sql/slave.h: keep track of last log sequence number in MASTER_INFO
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/rpl000014.result16
-rw-r--r--mysql-test/r/rpl000015.result16
-rw-r--r--mysql-test/r/rpl000016.result12
-rw-r--r--mysql-test/r/rpl_log.result10
-rwxr-xr-xmysql-test/t/rpl000017-slave.sh1
-rw-r--r--mysql-test/t/rpl_log.test5
6 files changed, 37 insertions, 23 deletions
diff --git a/mysql-test/r/rpl000014.result b/mysql-test/r/rpl000014.result
index b206fa99d10..cdafc7575ab 100644
--- a/mysql-test/r/rpl000014.result
+++ b/mysql-test/r/rpl000014.result
@@ -1,13 +1,13 @@
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 1 master-bin.001 79 Yes 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 1 master-bin.001 73 No 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 1 master-bin.001 73 Yes 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 1 master-bin.001 173 Yes 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 1 master-bin.001 79 Yes 0 0 1
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 1 master-bin.001 73 No 0 0 1
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 1 master-bin.001 73 Yes 0 0 1
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 1 master-bin.001 173 Yes 0 0 1
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
n
diff --git a/mysql-test/r/rpl000015.result b/mysql-test/r/rpl000015.result
index 12074224fd8..0aef660905b 100644
--- a/mysql-test/r/rpl000015.result
+++ b/mysql-test/r/rpl000015.result
@@ -1,13 +1,13 @@
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
- 0 0 0 No 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 test 9998 60 4 No 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 60 4 No 0 0
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 60 master-bin.001 79 Yes 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+ 0 0 0 No 0 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 test 9998 60 4 No 0 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 60 4 No 0 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 60 master-bin.001 79 Yes 0 0 1
n
10
45
diff --git a/mysql-test/r/rpl000016.result b/mysql-test/r/rpl000016.result
index 16f8eceaf6d..65f260bd575 100644
--- a/mysql-test/r/rpl000016.result
+++ b/mysql-test/r/rpl000016.result
@@ -1,5 +1,5 @@
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 60 master-bin.001 234 Yes 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 60 master-bin.001 234 Yes 0 0 3
s
Could not break slave
Tried hard
@@ -9,8 +9,8 @@ master-bin.002
master-bin.003
Log_name
master-bin.003
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 60 master-bin.003 202 Yes 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 60 master-bin.003 202 Yes 0 0 3
m
34
65
@@ -24,7 +24,7 @@ master-bin.005
master-bin.006
File Position Binlog_do_db Binlog_ignore_db
master-bin.006 720
-Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9999 60 master-bin.006 720 Yes 0 0
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 60 master-bin.006 720 Yes 0 0 11
count(*)
100
diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result
index 35c0c63e207..0ccc948de89 100644
--- a/mysql-test/r/rpl_log.result
+++ b/mysql-test/r/rpl_log.result
@@ -27,6 +27,9 @@ 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
+master-bin.002 79 Query 1 2 use test; create table t1 (n int)
+master-bin.002 137 Query 1 3 use test; insert into t1 values (1)
+master-bin.002 197 Query 1 4 use test; drop table t1
Log_name
master-bin.001
master-bin.002
@@ -42,8 +45,13 @@ slave-bin.001 253 Query 1 4 use test; insert into t1 values (NULL)
slave-bin.001 316 Query 1 5 use test; drop table t1
slave-bin.001 364 Query 1 6 use test; create table t1 (word char(20) not null)
slave-bin.001 439 Query 1 8 use test; drop table t1
-slave-bin.001 487 Rotate 2 3 slave-bin.002
+slave-bin.001 487 Rotate 2 3 slave-bin.002; forced by master
slave-bin.001 519 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 2 2 host=127.0.0.1,port=9306,log=master-bin.002,pos=4
+slave-bin.002 132 Query 1 2 use test; create table t1 (n int)
+slave-bin.002 190 Query 1 3 use test; insert into t1 values (1)
+slave-bin.002 250 Query 1 4 use test; drop table t1
+Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
+127.0.0.1 root 9999 1 master-bin.002 245 Yes 0 0 4
diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh
index 4415f093aad..2ead2021416 100755
--- a/mysql-test/t/rpl000017-slave.sh
+++ b/mysql-test/t/rpl000017-slave.sh
@@ -6,4 +6,5 @@ replicate
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
9306
1
+0
EOF
diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test
index 34c550b8169..0cfc1f58cac 100644
--- a/mysql-test/t/rpl_log.test
+++ b/mysql-test/t/rpl_log.test
@@ -20,6 +20,9 @@ show binlog events from 79 limit 1;
show binlog events from 79 limit 2;
show binlog events from 79 limit 2,1;
flush logs;
+create table t1 (n int);
+insert into t1 values (1);
+drop table t1;
show binlog events;
show binlog events in 'master-bin.002';
show master logs;
@@ -30,3 +33,5 @@ sync_with_master;
show master logs;
show binlog events in 'slave-bin.001' from 4;
show binlog events in 'slave-bin.002' from 4;
+--replace_result 9306 9999 3334 9999 3335 9999
+show slave status;