diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-06-23 19:37:24 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-06-23 19:37:24 -0600 |
commit | bcc51cb0a3d9fcf4e02ac2201a0a0a5a5538f17f (patch) | |
tree | d6cc479d4e3c59cd207caf465ed545d6dd6e1cc2 /sql/log.cc | |
parent | a697e30a3aa928d6896a45af4b762737d6906022 (diff) | |
download | mariadb-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 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index cacbfa85b3b..40e5d5673be 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -534,7 +534,14 @@ void MYSQL_LOG::new_file() to change base names at some point. */ Rotate_log_event r(new_name+dirname_length(new_name)); + THD* thd = current_thd; r.set_log_seq(0, this); + // this log rotation could have been initiated by a master of + // the slave running with log-bin + // we set the flag on rotate event to prevent inifinite log rotation + // loop + if(thd && slave_thd && thd == slave_thd) + r.flags |= LOG_EVENT_FORCED_ROTATE_F; r.write(&log_file); VOID(pthread_cond_broadcast(&COND_binlog_update)); } |