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
1023aecb
Commit
1023aecb
authored
Oct 10, 2006
by
mats@romeo.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b21474-mysql-5.1-new-rpl
parents
799585c5
6c3b1f6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
24 deletions
+29
-24
sql/log_event.cc
sql/log_event.cc
+13
-13
sql/slave.cc
sql/slave.cc
+16
-11
No files found.
sql/log_event.cc
View file @
1023aecb
...
...
@@ -2517,19 +2517,19 @@ int Format_description_log_event::exec_event(struct st_relay_log_info* rli)
if
(
server_id
==
(
uint32
)
::
server_id
)
{
/*
Do not modify rli->group_master_log_pos, as this event did not exist on
the master. That is, just update the *relay log* coordinates; this is
done by passing log_pos=0 to inc_group_relay_log_pos, like we do in
Stop_log_event::exec_event()
.
If in a transaction, don't touch group_* coordinates.
*/
if
(
thd
->
options
&
OPTION_BEGIN
)
rli
->
inc_event_relay_log_pos
();
else
{
rli
->
inc_group_relay_log_pos
(
0
);
flush_relay_log_info
(
rli
);
}
We only increase the relay log position if we are skipping
events and do not touch any group_* variables, nor flush the
relay log info. If there is a crash, we will have to re-skip
the events again, but that is a minor issue
.
If we do not skip stepping the group log position (and the
server id was changed when restarting the server), it might well
be that we start executing at a position that is invalid, e.g.,
at a Rows_log_event or a Query_log_event preceeded by a
Intvar_log_event instead of starting at a Table_map_log_event or
the Intvar_log_event respectively.
*/
rli
->
inc_event_relay_log_pos
();
DBUG_RETURN
(
0
);
}
...
...
sql/slave.cc
View file @
1023aecb
...
...
@@ -3101,17 +3101,22 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
type_code
!=
START_EVENT_V3
&&
type_code
!=
FORMAT_DESCRIPTION_EVENT
))
{
DBUG_PRINT
(
"info"
,
(
"event skipped"
));
if
(
thd
->
options
&
OPTION_BEGIN
)
rli
->
inc_event_relay_log_pos
();
else
{
rli
->
inc_group_relay_log_pos
((
type_code
==
ROTATE_EVENT
||
type_code
==
STOP_EVENT
||
type_code
==
FORMAT_DESCRIPTION_EVENT
)
?
LL
(
0
)
:
ev
->
log_pos
,
1
/* skip lock*/
);
flush_relay_log_info
(
rli
);
}
/*
We only skip the event here and do not increase the group log
position. In the event that we have to restart, this means
that we might have to skip the event again, but that is a
minor issue.
If we were to increase the group log position when skipping an
event, it might be that we are restarting at the wrong
position and have events before that we should have executed,
so not increasing the group log position is a sure bet in this
case.
In this way, we just step the group log position when we
*know* that we are at the end of a group.
*/
rli
->
inc_event_relay_log_pos
();
/*
Protect against common user error of setting the counter to 1
...
...
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