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
b1b73137
Commit
b1b73137
authored
Jul 14, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong test in LOG::close
Fixed test for binary build
parent
cda64baa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
mysql-test/r/rpl_max_relay_size.result
mysql-test/r/rpl_max_relay_size.result
+6
-6
mysql-test/t/rpl_max_relay_size.test
mysql-test/t/rpl_max_relay_size.test
+6
-0
sql/log.cc
sql/log.cc
+2
-2
No files found.
mysql-test/r/rpl_max_relay_size.result
View file @
b1b73137
...
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
...
@@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
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
9306
1 master-bin.001 50477 slave-relay-bin.014 1221 master-bin.001 Yes Yes 0 0 50477 1221
127.0.0.1 root
MASTER_PORT
1 master-bin.001 50477 slave-relay-bin.014 1221 master-bin.001 Yes Yes 0 0 50477 1221
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=(5*4096);
set global max_relay_log_size=(5*4096);
...
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
...
@@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
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
9306
1 master-bin.001 50477 slave-relay-bin.004 9457 master-bin.001 Yes Yes 0 0 50477 9457
127.0.0.1 root
MASTER_PORT
1 master-bin.001 50477 slave-relay-bin.004 9457 master-bin.001 Yes Yes 0 0 50477 9457
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=0;
set global max_relay_log_size=0;
...
@@ -36,25 +36,25 @@ select @@global.max_relay_log_size;
...
@@ -36,25 +36,25 @@ select @@global.max_relay_log_size;
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
9306
1 master-bin.001 50477 slave-relay-bin.008 1283 master-bin.001 Yes Yes 0 0 50477 1283
127.0.0.1 root
MASTER_PORT
1 master-bin.001 50477 slave-relay-bin.008 1283 master-bin.001 Yes Yes 0 0 50477 1283
stop slave;
stop slave;
reset slave;
reset 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
9306
1 4 slave-relay-bin.001 4 No No 0 0 0 4
127.0.0.1 root
MASTER_PORT
1 4 slave-relay-bin.001 4 No No 0 0 0 4
reset slave;
reset slave;
start slave;
start slave;
flush logs;
flush logs;
create table t1 (a int);
create table t1 (a int);
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
9306
1 master-bin.001 50535 slave-relay-bin.009 62 master-bin.001 Yes Yes 0 0 50535 62
127.0.0.1 root
MASTER_PORT
1 master-bin.001 50535 slave-relay-bin.009 62 master-bin.001 Yes Yes 0 0 50535 62
flush logs;
flush logs;
drop table t1;
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
9306
1 master-bin.001 50583 slave-relay-bin.010 52 master-bin.001 Yes Yes 0 0 50583 52
127.0.0.1 root
MASTER_PORT
1 master-bin.001 50583 slave-relay-bin.010 52 master-bin.001 Yes Yes 0 0 50583 52
flush logs;
flush logs;
show master status;
show master status;
File Position Binlog_do_db Binlog_ignore_db
File Position Binlog_do_db Binlog_ignore_db
...
...
mysql-test/t/rpl_max_relay_size.test
View file @
b1b73137
...
@@ -28,6 +28,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
...
@@ -28,6 +28,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
select
@@
global
.
max_relay_log_size
;
select
@@
global
.
max_relay_log_size
;
start
slave
;
start
slave
;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
stop
slave
;
stop
slave
;
reset
slave
;
reset
slave
;
...
@@ -35,6 +36,7 @@ set global max_relay_log_size=(5*4096);
...
@@ -35,6 +36,7 @@ set global max_relay_log_size=(5*4096);
select
@@
global
.
max_relay_log_size
;
select
@@
global
.
max_relay_log_size
;
start
slave
;
start
slave
;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
stop
slave
;
stop
slave
;
reset
slave
;
reset
slave
;
...
@@ -42,6 +44,7 @@ set global max_relay_log_size=0;
...
@@ -42,6 +44,7 @@ set global max_relay_log_size=0;
select
@@
global
.
max_relay_log_size
;
select
@@
global
.
max_relay_log_size
;
start
slave
;
start
slave
;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
# Tests below are mainly to ensure that we have not coded with wrong assumptions
# Tests below are mainly to ensure that we have not coded with wrong assumptions
...
@@ -51,6 +54,7 @@ reset slave;
...
@@ -51,6 +54,7 @@ reset slave;
# test of relay log rotation when the slave is stopped
# test of relay log rotation when the slave is stopped
# (to make sure it does not crash).
# (to make sure it does not crash).
flush
logs
;
flush
logs
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
reset
slave
;
reset
slave
;
...
@@ -65,6 +69,7 @@ create table t1 (a int);
...
@@ -65,6 +69,7 @@ create table t1 (a int);
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
# one more rotation, to be sure Relay_log_space is correctly updated
# one more rotation, to be sure Relay_log_space is correctly updated
flush
logs
;
flush
logs
;
...
@@ -73,6 +78,7 @@ drop table t1;
...
@@ -73,6 +78,7 @@ drop table t1;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
3334
MASTER_PORT
show
slave
status
;
show
slave
status
;
connection
master
;
connection
master
;
...
...
sql/log.cc
View file @
b1b73137
...
@@ -584,7 +584,7 @@ bool MYSQL_LOG::reset_logs(THD* thd)
...
@@ -584,7 +584,7 @@ bool MYSQL_LOG::reset_logs(THD* thd)
}
}
/* Start logging with a new file */
/* Start logging with a new file */
close
(
LOG_CLOSE_INDEX
|
LOG_CLOSE_STOP_EVENT
);
close
(
LOG_CLOSE_INDEX
);
my_delete
(
index_file_name
,
MYF
(
MY_WME
));
// Reset (open will update)
my_delete
(
index_file_name
,
MYF
(
MY_WME
));
// Reset (open will update)
if
(
!
thd
->
slave_thread
)
if
(
!
thd
->
slave_thread
)
need_start_event
=
1
;
need_start_event
=
1
;
...
@@ -1544,7 +1544,7 @@ void MYSQL_LOG::close(uint exiting)
...
@@ -1544,7 +1544,7 @@ void MYSQL_LOG::close(uint exiting)
{
// One can't set log_type here!
{
// One can't set log_type here!
DBUG_ENTER
(
"MYSQL_LOG::close"
);
DBUG_ENTER
(
"MYSQL_LOG::close"
);
DBUG_PRINT
(
"enter"
,(
"exiting: %d"
,
(
int
)
exiting
));
DBUG_PRINT
(
"enter"
,(
"exiting: %d"
,
(
int
)
exiting
));
if
(
is_open
()
)
if
(
log_type
!=
LOG_CLOSED
&&
log_type
!=
LOG_TO_BE_OPENED
)
{
{
if
(
log_type
==
LOG_BIN
&&
!
no_auto_events
&&
if
(
log_type
==
LOG_BIN
&&
!
no_auto_events
&&
(
exiting
&
LOG_CLOSE_STOP_EVENT
))
(
exiting
&
LOG_CLOSE_STOP_EVENT
))
...
...
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