Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4b7897fc
Commit
4b7897fc
authored
Oct 29, 2002
by
nick@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed binlog name padding from binlog.001 to binlog.000001
parent
b9007ca6
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
97 additions
and
94 deletions
+97
-94
mysql-test/Makefile.am
mysql-test/Makefile.am
+1
-1
mysql-test/r/rpl000015.result
mysql-test/r/rpl000015.result
+4
-4
mysql-test/r/rpl000018.result
mysql-test/r/rpl000018.result
+2
-2
mysql-test/r/rpl_flush_log_loop.result
mysql-test/r/rpl_flush_log_loop.result
+1
-1
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+48
-48
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+6
-6
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+13
-13
mysql-test/std_data/master-bin.000001
mysql-test/std_data/master-bin.000001
+0
-0
mysql-test/t/rpl000017-slave.sh
mysql-test/t/rpl000017-slave.sh
+1
-1
mysql-test/t/rpl_log.test
mysql-test/t/rpl_log.test
+9
-9
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+1
-1
sql/log.cc
sql/log.cc
+11
-8
No files found.
mysql-test/Makefile.am
View file @
4b7897fc
...
...
@@ -30,7 +30,7 @@ dist-hook:
$(INSTALL_DATA)
$(srcdir)
/t/
*
.test
$(srcdir)
/t/
*
.opt
$(srcdir)
/t/
*
.sh
$(distdir)
/t
$(INSTALL_DATA)
$(srcdir)
/include/
*
.inc
$(distdir)
/include
$(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/
*
.00
000
1
$(distdir)
/std_data
install-data-local
:
$(mkinstalldirs)
\
...
...
mysql-test/r/rpl000015.result
View file @
4b7897fc
reset master;
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
master-bin.00
000
1 79
reset slave;
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
change master to master_host='127.0.0.1';
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
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.00
000
1 4 No No 0 0 0 4
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
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
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.00
000
1 4 No No 0 0 0 4
start slave;
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
127.0.0.1 root MASTER_PORT 7 master-bin.00
1 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.00
0001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
...
...
mysql-test/r/rpl000018.result
View file @
4b7897fc
...
...
@@ -2,8 +2,8 @@ reset slave;
start slave;
show binary logs;
Log_name
master-bin.001
master-bin.002
master-bin.00
000
1
master-bin.00
000
2
drop table if exists t1;
create table t1(n int);
insert into t1 values (3351);
...
...
mysql-test/r/rpl_flush_log_loop.result
View file @
4b7897fc
...
...
@@ -14,4 +14,4 @@ start slave;
flush logs;
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
127.0.0.1 root SLAVE_PORT 60 slave-bin.00
1 79 relay-log.001 119 slave-bin.001 Yes Yes 0 0 79 119
127.0.0.1 root SLAVE_PORT 60 slave-bin.00
0001 79 relay-log.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
mysql-test/r/rpl_log.result
View file @
4b7897fc
...
...
@@ -16,25 +16,25 @@ load data infile '../../std_data/words.dat' into table t1;
drop table t1;
show binlog events;
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.001 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.001 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.001 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.001 556 Exec_load 1 556 ;file_id=1
master-bin.001 579 Query 1 579 use `test`; drop table t1
master-bin.00
000
1 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.00
000
1 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.00
000
1 172 Intvar 1 172 INSERT_ID=1
master-bin.00
000
1 200 Query 1 200 use `test`; insert into t1 values (NULL)
master-bin.00
000
1 263 Query 1 263 use `test`; drop table t1
master-bin.00
000
1 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
master-bin.00
000
1 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
master-bin.00
000
1 556 Exec_load 1 556 ;file_id=1
master-bin.00
000
1 579 Query 1 579 use `test`; drop table t1
show binlog events from 79 limit 1;
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.00
000
1 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
show binlog events from 79 limit 2;
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.001 172 Intvar 1 172 INSERT_ID=1
master-bin.00
000
1 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.00
000
1 172 Intvar 1 172 INSERT_ID=1
show binlog events from 79 limit 2,1;
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.00
000
1 200 Query 1 200 use `test`; insert into t1 values (NULL)
flush logs;
start slave;
flush logs;
...
...
@@ -44,49 +44,49 @@ insert into t1 values (1);
drop table t1;
show binlog events;
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.001 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.001 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.001 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.001 556 Exec_load 1 556 ;file_id=1
master-bin.001 579 Query 1 579 use `test`; drop table t1
master-bin.00
1 627 Rotate 1 627 master-bin.
002;pos=4
show binlog events in 'master-bin.002';
master-bin.00
000
1 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.00
000
1 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
master-bin.00
000
1 172 Intvar 1 172 INSERT_ID=1
master-bin.00
000
1 200 Query 1 200 use `test`; insert into t1 values (NULL)
master-bin.00
000
1 263 Query 1 263 use `test`; drop table t1
master-bin.00
000
1 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
master-bin.00
000
1 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
master-bin.00
000
1 556 Exec_load 1 556 ;file_id=1
master-bin.00
000
1 579 Query 1 579 use `test`; drop table t1
master-bin.00
0001 627 Rotate 1 627 master-bin.000
002;pos=4
show binlog events in 'master-bin.00
000
2';
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.002 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.00
000
2 4 Query 1 4 use `test`; create table t1 (n int)
master-bin.00
000
2 62 Query 1 62 use `test`; insert into t1 values (1)
master-bin.00
000
2 122 Query 1 122 use `test`; drop table t1
show binary logs;
Log_name
master-bin.001
master-bin.002
master-bin.00
000
1
master-bin.00
000
2
start slave;
show binary logs;
Log_name
slave-bin.001
slave-bin.002
show binlog events in 'slave-bin.001' from 4;
slave-bin.00
000
1
slave-bin.00
000
2
show binlog events in 'slave-bin.00
000
1' from 4;
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.001 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.001 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.001 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.001 565 Exec_load 1 556 ;file_id=1
slave-bin.001 588 Query 1 579 use `test`; drop table t1
slave-bin.00
1 636 Rotate 2 636 slave-bin.
002;pos=4
show binlog events in 'slave-bin.002' from 4;
slave-bin.00
000
1 4 Start 2 4 Server ver: VERSION, Binlog ver: 3
slave-bin.00
000
1 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key)
slave-bin.00
000
1 172 Intvar 1 200 INSERT_ID=1
slave-bin.00
000
1 200 Query 1 200 use `test`; insert into t1 values (NULL)
slave-bin.00
000
1 263 Query 1 263 use `test`; drop table t1
slave-bin.00
000
1 311 Query 1 311 use `test`; create table t1 (word char(20) not null)
slave-bin.00
000
1 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=81
slave-bin.00
000
1 565 Exec_load 1 556 ;file_id=1
slave-bin.00
000
1 588 Query 1 579 use `test`; drop table t1
slave-bin.00
0001 636 Rotate 2 636 slave-bin.000
002;pos=4
show binlog events in 'slave-bin.00
000
2' from 4;
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.002 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.00
000
2 4 Query 1 4 use `test`; create table t1 (n int)
slave-bin.00
000
2 62 Query 1 62 use `test`; insert into t1 values (1)
slave-bin.00
000
2 122 Query 1 122 use `test`; drop table t1
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
127.0.0.1 root MASTER_PORT 1 master-bin.00
2 170 slave-relay-bin.002 957 master-bin.002 Yes Yes 0 0 170 961
show binlog events in 'slave-bin.005' from 4;
127.0.0.1 root MASTER_PORT 1 master-bin.00
0002 170 slave-relay-bin.000002 969 master-bin.000002 Yes Yes 0 0 170 973
show binlog events in 'slave-bin.00
000
5' from 4;
Error when executing command SHOW BINLOG EVENTS: Could not find target log
mysql-test/r/rpl_log_pos.result
View file @
4b7897fc
...
...
@@ -6,28 +6,28 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
master-bin.00
000
1 79
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
127.0.0.1 root MASTER_PORT 1 master-bin.00
1 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.00
0001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
change master to master_log_pos=73;
stop slave;
change master to master_log_pos=73;
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
127.0.0.1 root MASTER_PORT 1 master-bin.00
1 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.00
0001 73 slave-relay-bin.000001 4 master-bin.000
001 No No 0 0 73 4
start slave;
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
127.0.0.1 root MASTER_PORT 1 master-bin.00
1 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.00
0001 73 slave-relay-bin.000001 4 master-bin.000
001 No Yes 0 0 73 4
change master to master_log_pos=173;
start slave;
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
127.0.0.1 root MASTER_PORT 1 master-bin.00
1 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.00
0001 173 slave-relay-bin.000001 4 master-bin.000
001 No Yes 0 0 173 4
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
master-bin.00
000
1 79
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
...
...
mysql-test/r/rpl_rotate_logs.result
View file @
4b7897fc
...
...
@@ -15,7 +15,7 @@ create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
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
127.0.0.1 root MASTER_PORT 60 master-bin.00
1 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.00
0001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
select * from t1;
s
Could not break slave
...
...
@@ -27,9 +27,9 @@ insert into t2 values (34),(67),(123);
flush logs;
show binary logs;
Log_name
master-bin.001
master-bin.002
master-bin.003
master-bin.00
000
1
master-bin.00
000
2
master-bin.00
000
3
create table t3 select * from temp_table;
select * from t3;
a
...
...
@@ -40,14 +40,14 @@ set insert_id=1234;
insert into t2 values(NULL);
set global sql_slave_skip_counter=1;
start slave;
purge master logs to 'master-bin.003';
purge master logs to 'master-bin.00
000
3';
show binary logs;
Log_name
master-bin.003
master-bin.00
000
3
insert into t2 values (65);
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
127.0.0.1 root MASTER_PORT 60 master-bin.00
3 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.00
0003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
select * from t2;
m
34
...
...
@@ -62,19 +62,19 @@ create table t3 (n int);
create table t4 select * from temp_table;
show binary logs;
Log_name
master-bin.003
master-bin.004
master-bin.005
master-bin.006
master-bin.00
000
3
master-bin.00
000
4
master-bin.00
000
5
master-bin.00
000
6
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.006 838
master-bin.00
000
6 838
select * from t4;
a
testing temporary tables part 2
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
127.0.0.1 root MASTER_PORT 60 master-bin.00
6 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.00
0006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
...
...
mysql-test/std_data/master-bin.000001
0 → 100644
View file @
4b7897fc
File added
mysql-test/t/rpl000017-slave.sh
View file @
4b7897fc
rm
-f
$MYSQL_TEST_DIR
/var/log/
*
relay
*
rm
-f
$MYSQL_TEST_DIR
/var/slave-data/relay-log.info
cat
>
$MYSQL_TEST_DIR
/var/slave-data/master.info
<<
EOF
master-bin.001
master-bin.00
000
1
4
127.0.0.1
replicate
...
...
mysql-test/t/rpl_log.test
View file @
4b7897fc
...
...
@@ -39,7 +39,7 @@ insert into t1 values (1);
drop
table
t1
;
--
replace_result
$VERSION
VERSION
show
binlog
events
;
show
binlog
events
in
'master-bin.002'
;
show
binlog
events
in
'master-bin.00
000
2'
;
show
binary
logs
;
save_master_pos
;
connection
slave
;
...
...
@@ -47,19 +47,19 @@ start slave;
sync_with_master
;
show
binary
logs
;
--
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.00
000
1'
from
4
;
--
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.00
000
2'
from
4
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
# 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.001' 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.002' 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.00
000
1' and master_log_pos=4 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.00
000
1' and master_log_pos=79 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.00
000
1' and master_log_pos=311 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.00
000
2' and master_log_pos=4 and master_server_id=1;
#show new master for slave with master_log_file='master-bin.00
000
2' and master_log_pos=122 and master_server_id=1;
--
error
1220
show
binlog
events
in
'slave-bin.005'
from
4
;
show
binlog
events
in
'slave-bin.00
000
5'
from
4
;
mysql-test/t/rpl_rotate_logs.test
View file @
4b7897fc
...
...
@@ -86,7 +86,7 @@ connection master;
#let slave catch up
sync_slave_with_master
;
connection
master
;
purge
master
logs
to
'master-bin.003'
;
purge
master
logs
to
'master-bin.00
000
3'
;
show
binary
logs
;
insert
into
t2
values
(
65
);
sync_slave_with_master
;
...
...
sql/log.cc
View file @
4b7897fc
...
...
@@ -45,16 +45,19 @@ static bool test_if_number(const char *str,
static
int
find_uniq_filename
(
char
*
name
)
{
long
number
;
uint
i
,
length
;
char
buff
[
FN_REFLEN
];
struct
st_my_dir
*
dir_info
;
long
number
;
uint
i
;
char
buff
[
FN_REFLEN
];
struct
st_my_dir
*
dir_info
;
reg1
struct
fileinfo
*
file_info
;
ulong
max_found
=
0
;
ulong
max_found
=
0
;
DBUG_ENTER
(
"find_uniq_filename"
);
length
=
dirname_part
(
buff
,
name
);
char
*
start
=
name
+
length
,
*
end
=
strend
(
start
);
uint
length
=
dirname_part
(
buff
,
name
);
char
*
start
=
name
+
length
;
char
*
end
=
strend
(
start
);
*
end
=
'.'
;
length
=
(
uint
)
(
end
-
start
+
1
);
...
...
@@ -75,7 +78,7 @@ static int find_uniq_filename(char *name)
my_dirend
(
dir_info
);
*
end
++=
'.'
;
sprintf
(
end
,
"%0
3
ld"
,
max_found
+
1
);
sprintf
(
end
,
"%0
6
ld"
,
max_found
+
1
);
DBUG_RETURN
(
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment