Commit c60deb17 authored by unknown's avatar unknown

Changed binlog name padding from binlog.001 to binlog.000001


mysql-test/Makefile.am:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl000015.result:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl000018.result:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl_flush_log_loop.result:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl_log.result:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl_log_pos.result:
  Changed binlog.001 to be binlog.000001
mysql-test/r/rpl_rotate_logs.result:
  Changed binlog.001 to be binlog.000001
mysql-test/t/rpl000017-slave.sh:
  Changed binlog.001 to be binlog.000001
mysql-test/t/rpl_log.test:
  Changed binlog.001 to be binlog.000001
mysql-test/t/rpl_rotate_logs.test:
  Changed binlog.001 to be binlog.000001
sql/log.cc:
  Changed binlog.001 to be binlog.000001
parent 22838ee1
...@@ -30,7 +30,7 @@ dist-hook: ...@@ -30,7 +30,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(distdir)/t $(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(distdir)/t
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include $(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r $(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.001 $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
install-data-local: install-data-local:
$(mkinstalldirs) \ $(mkinstalldirs) \
......
reset master; reset master;
show master status; show master status;
File Position Binlog_do_db Binlog_ignore_db File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79 master-bin.000001 79
reset slave; reset slave;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 4 127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT; master_password='',master_port=MASTER_PORT;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 4 127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
start slave; start slave;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 120 127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
drop table if exists t1; drop table if exists t1;
create table t1 (n int); create table t1 (n int);
insert into t1 values (10),(45),(90); insert into t1 values (10),(45),(90);
......
...@@ -2,8 +2,8 @@ reset slave; ...@@ -2,8 +2,8 @@ reset slave;
start slave; start slave;
show binary logs; show binary logs;
Log_name Log_name
master-bin.001 master-bin.000001
master-bin.002 master-bin.000002
drop table if exists t1; drop table if exists t1;
create table t1(n int); create table t1(n int);
insert into t1 values (3351); insert into t1 values (3351);
......
...@@ -14,4 +14,4 @@ start slave; ...@@ -14,4 +14,4 @@ start slave;
flush logs; flush logs;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root SLAVE_PORT 60 slave-bin.001 79 relay-log.001 119 slave-bin.001 Yes Yes 0 0 79 119 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
...@@ -16,25 +16,25 @@ load data infile '../../std_data/words.dat' into table t1; ...@@ -16,25 +16,25 @@ load data infile '../../std_data/words.dat' into table t1;
drop table t1; drop table t1;
show binlog events; show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.001 172 Intvar 1 172 INSERT_ID=1 master-bin.000001 172 Intvar 1 172 INSERT_ID=1
master-bin.001 200 Query 1 200 use `test`; insert into t1 values (NULL) master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL)
master-bin.001 263 Query 1 263 use `test`; drop table t1 master-bin.000001 263 Query 1 263 use `test`; drop table t1
master-bin.001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
master-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81 master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
master-bin.001 556 Exec_load 1 556 ;file_id=1 master-bin.000001 556 Exec_load 1 556 ;file_id=1
master-bin.001 579 Query 1 579 use `test`; drop table t1 master-bin.000001 579 Query 1 579 use `test`; drop table t1
show binlog events from 79 limit 1; show binlog events from 79 limit 1;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
show binlog events from 79 limit 2; show binlog events from 79 limit 2;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.001 172 Intvar 1 172 INSERT_ID=1 master-bin.000001 172 Intvar 1 172 INSERT_ID=1
show binlog events from 79 limit 2,1; show binlog events from 79 limit 2,1;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 200 Query 1 200 use `test`; insert into t1 values (NULL) master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL)
flush logs; flush logs;
start slave; start slave;
flush logs; flush logs;
...@@ -44,49 +44,49 @@ insert into t1 values (1); ...@@ -44,49 +44,49 @@ insert into t1 values (1);
drop table t1; drop table t1;
show binlog events; show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.001 172 Intvar 1 172 INSERT_ID=1 master-bin.000001 172 Intvar 1 172 INSERT_ID=1
master-bin.001 200 Query 1 200 use `test`; insert into t1 values (NULL) master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL)
master-bin.001 263 Query 1 263 use `test`; drop table t1 master-bin.000001 263 Query 1 263 use `test`; drop table t1
master-bin.001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
master-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81 master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
master-bin.001 556 Exec_load 1 556 ;file_id=1 master-bin.000001 556 Exec_load 1 556 ;file_id=1
master-bin.001 579 Query 1 579 use `test`; drop table t1 master-bin.000001 579 Query 1 579 use `test`; drop table t1
master-bin.001 627 Rotate 1 627 master-bin.002;pos=4 master-bin.000001 627 Rotate 1 627 master-bin.000002;pos=4
show binlog events in 'master-bin.002'; show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.002 4 Query 1 4 use `test`; create table t1 (n int) master-bin.000002 4 Query 1 4 use `test`; create table t1 (n int)
master-bin.002 62 Query 1 62 use `test`; insert into t1 values (1) master-bin.000002 62 Query 1 62 use `test`; insert into t1 values (1)
master-bin.002 122 Query 1 122 use `test`; drop table t1 master-bin.000002 122 Query 1 122 use `test`; drop table t1
show binary logs; show binary logs;
Log_name Log_name
master-bin.001 master-bin.000001
master-bin.002 master-bin.000002
start slave; start slave;
show binary logs; show binary logs;
Log_name Log_name
slave-bin.001 slave-bin.000001
slave-bin.002 slave-bin.000002
show binlog events in 'slave-bin.001' from 4; show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3
slave-bin.001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) slave-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.001 172 Intvar 1 200 INSERT_ID=1 slave-bin.000001 172 Intvar 1 200 INSERT_ID=1
slave-bin.001 200 Query 1 200 use `test`; insert into t1 values (NULL) slave-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL)
slave-bin.001 263 Query 1 263 use `test`; drop table t1 slave-bin.000001 263 Query 1 263 use `test`; drop table t1
slave-bin.001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) slave-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
slave-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81 slave-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
slave-bin.001 565 Exec_load 1 556 ;file_id=1 slave-bin.000001 565 Exec_load 1 556 ;file_id=1
slave-bin.001 588 Query 1 579 use `test`; drop table t1 slave-bin.000001 588 Query 1 579 use `test`; drop table t1
slave-bin.001 636 Rotate 2 636 slave-bin.002;pos=4 slave-bin.000001 636 Rotate 2 636 slave-bin.000002;pos=4
show binlog events in 'slave-bin.002' from 4; show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.002 4 Query 1 4 use `test`; create table t1 (n int) slave-bin.000002 4 Query 1 4 use `test`; create table t1 (n int)
slave-bin.002 62 Query 1 62 use `test`; insert into t1 values (1) slave-bin.000002 62 Query 1 62 use `test`; insert into t1 values (1)
slave-bin.002 122 Query 1 122 use `test`; drop table t1 slave-bin.000002 122 Query 1 122 use `test`; drop table t1
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.002 170 slave-relay-bin.002 957 master-bin.002 Yes Yes 0 0 170 961 127.0.0.1 root MASTER_PORT 1 master-bin.000002 170 slave-relay-bin.000002 969 master-bin.000002 Yes Yes 0 0 170 973
show binlog events in 'slave-bin.005' from 4; show binlog events in 'slave-bin.000005' from 4;
Error when executing command SHOW BINLOG EVENTS: Could not find target log Error when executing command SHOW BINLOG EVENTS: Could not find target log
...@@ -6,28 +6,28 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; ...@@ -6,28 +6,28 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show master status; show master status;
File Position Binlog_do_db Binlog_ignore_db File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79 master-bin.000001 79
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 79 slave-relay-bin.002 120 master-bin.001 Yes Yes 0 0 79 124 127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
change master to master_log_pos=73; change master to master_log_pos=73;
stop slave; stop slave;
change master to master_log_pos=73; change master to master_log_pos=73;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 No No 0 0 73 4 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4
start slave; start slave;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 73 4 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
change master to master_log_pos=173; change master to master_log_pos=173;
start slave; start slave;
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 173 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 173 4 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4
show master status; show master status;
File Position Binlog_do_db Binlog_ignore_db File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79 master-bin.000001 79
create table if not exists t1 (n int); create table if not exists t1 (n int);
drop table if exists t1; drop table if exists t1;
create table t1 (n int); create table t1 (n int);
......
...@@ -15,7 +15,7 @@ create table t1 (s text); ...@@ -15,7 +15,7 @@ create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard'); insert into t1 values('Could not break slave'),('Tried hard');
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.001 417 slave-relay-bin.001 458 master-bin.001 Yes Yes 0 0 417 458 127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
select * from t1; select * from t1;
s s
Could not break slave Could not break slave
...@@ -27,9 +27,9 @@ insert into t2 values (34),(67),(123); ...@@ -27,9 +27,9 @@ insert into t2 values (34),(67),(123);
flush logs; flush logs;
show binary logs; show binary logs;
Log_name Log_name
master-bin.001 master-bin.000001
master-bin.002 master-bin.000002
master-bin.003 master-bin.000003
create table t3 select * from temp_table; create table t3 select * from temp_table;
select * from t3; select * from t3;
a a
...@@ -40,14 +40,14 @@ set insert_id=1234; ...@@ -40,14 +40,14 @@ set insert_id=1234;
insert into t2 values(NULL); insert into t2 values(NULL);
set global sql_slave_skip_counter=1; set global sql_slave_skip_counter=1;
start slave; start slave;
purge master logs to 'master-bin.003'; purge master logs to 'master-bin.000003';
show binary logs; show binary logs;
Log_name Log_name
master-bin.003 master-bin.000003
insert into t2 values (65); insert into t2 values (65);
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.003 290 slave-relay-bin.001 1073 master-bin.003 Yes Yes 0 0 290 1073 127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
select * from t2; select * from t2;
m m
34 34
...@@ -62,19 +62,19 @@ create table t3 (n int); ...@@ -62,19 +62,19 @@ create table t3 (n int);
create table t4 select * from temp_table; create table t4 select * from temp_table;
show binary logs; show binary logs;
Log_name Log_name
master-bin.003 master-bin.000003
master-bin.004 master-bin.000004
master-bin.005 master-bin.000005
master-bin.006 master-bin.000006
show master status; show master status;
File Position Binlog_do_db Binlog_ignore_db File Position Binlog_do_db Binlog_ignore_db
master-bin.006 838 master-bin.000006 838
select * from t4; select * from t4;
a a
testing temporary tables part 2 testing temporary tables part 2
show slave status; show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.006 838 slave-relay-bin.001 8034 master-bin.006 Yes Yes 0 0 838 8034 127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
lock tables t3 read; lock tables t3 read;
select count(*) from t3 where n >= 4; select count(*) from t3 where n >= 4;
count(*) count(*)
......
rm -f $MYSQL_TEST_DIR/var/log/*relay* rm -f $MYSQL_TEST_DIR/var/log/*relay*
rm -f $MYSQL_TEST_DIR/var/slave-data/relay-log.info rm -f $MYSQL_TEST_DIR/var/slave-data/relay-log.info
cat > $MYSQL_TEST_DIR/var/slave-data/master.info <<EOF cat > $MYSQL_TEST_DIR/var/slave-data/master.info <<EOF
master-bin.001 master-bin.000001
4 4
127.0.0.1 127.0.0.1
replicate replicate
......
...@@ -39,7 +39,7 @@ insert into t1 values (1); ...@@ -39,7 +39,7 @@ insert into t1 values (1);
drop table t1; drop table t1;
--replace_result $VERSION VERSION --replace_result $VERSION VERSION
show binlog events; show binlog events;
show binlog events in 'master-bin.002'; show binlog events in 'master-bin.000002';
show binary logs; show binary logs;
save_master_pos; save_master_pos;
connection slave; connection slave;
...@@ -47,19 +47,19 @@ start slave; ...@@ -47,19 +47,19 @@ start slave;
sync_with_master; sync_with_master;
show binary logs; show binary logs;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION
show binlog events in 'slave-bin.001' from 4; show binlog events in 'slave-bin.000001' from 4;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION
show binlog events in 'slave-bin.002' from 4; show binlog events in 'slave-bin.000002' from 4;
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT --replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
show slave status; show slave status;
# Need to recode the following # Need to recode the following
#show new master for slave with master_log_file='master-bin.001' and master_log_pos=4 and master_server_id=1; #show new master for slave with master_log_file='master-bin.000001' and master_log_pos=4 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.001' and master_log_pos=79 and master_server_id=1; #show new master for slave with master_log_file='master-bin.000001' and master_log_pos=79 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.001' and master_log_pos=311 and master_server_id=1; #show new master for slave with master_log_file='master-bin.000001' and master_log_pos=311 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.002' and master_log_pos=4 and master_server_id=1; #show new master for slave with master_log_file='master-bin.000002' and master_log_pos=4 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.002' and master_log_pos=122 and master_server_id=1; #show new master for slave with master_log_file='master-bin.000002' and master_log_pos=122 and master_server_id=1;
--error 1220 --error 1220
show binlog events in 'slave-bin.005' from 4; show binlog events in 'slave-bin.000005' from 4;
...@@ -86,7 +86,7 @@ connection master; ...@@ -86,7 +86,7 @@ connection master;
#let slave catch up #let slave catch up
sync_slave_with_master; sync_slave_with_master;
connection master; connection master;
purge master logs to 'master-bin.003'; purge master logs to 'master-bin.000003';
show binary logs; show binary logs;
insert into t2 values (65); insert into t2 values (65);
sync_slave_with_master; sync_slave_with_master;
......
...@@ -45,16 +45,19 @@ static bool test_if_number(const char *str, ...@@ -45,16 +45,19 @@ static bool test_if_number(const char *str,
static int find_uniq_filename(char *name) static int find_uniq_filename(char *name)
{ {
long number; long number;
uint i,length; uint i;
char buff[FN_REFLEN]; char buff[FN_REFLEN];
struct st_my_dir *dir_info; struct st_my_dir *dir_info;
reg1 struct fileinfo *file_info; reg1 struct fileinfo *file_info;
ulong max_found=0; ulong max_found=0;
DBUG_ENTER("find_uniq_filename"); DBUG_ENTER("find_uniq_filename");
length=dirname_part(buff,name); uint length = dirname_part(buff,name);
char *start=name+length,*end=strend(start); char *start = name + length;
char *end = strend(start);
*end='.'; *end='.';
length= (uint) (end-start+1); length= (uint) (end-start+1);
...@@ -75,7 +78,7 @@ static int find_uniq_filename(char *name) ...@@ -75,7 +78,7 @@ static int find_uniq_filename(char *name)
my_dirend(dir_info); my_dirend(dir_info);
*end++='.'; *end++='.';
sprintf(end,"%03ld",max_found+1); sprintf(end,"%06ld",max_found+1);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
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