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
15d8e9d0
Commit
15d8e9d0
authored
Mar 01, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
1c44237c
12ede13a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
16 deletions
+42
-16
sql/ha_innodb.cc
sql/ha_innodb.cc
+6
-8
sql/log_event.cc
sql/log_event.cc
+27
-3
sql/slave.h
sql/slave.h
+9
-5
No files found.
sql/ha_innodb.cc
View file @
15d8e9d0
...
...
@@ -938,19 +938,17 @@ innobase_commit_low(
return
;
}
/* TODO: Guilhem should check if master_log_name, pending
etc. are right if the master log gets rotated! Possible bug here.
Comment by Heikki March 4, 2003. */
if
(
current_thd
->
slave_thread
)
{
/* Update the replication position info inside InnoDB */
trx
->
mysql_master_log_file_name
=
active_mi
->
rli
.
master_log_name
;
trx
->
mysql_master_log_pos
=
((
ib_longlong
)
(
active_mi
->
rli
.
master_log_pos
+
active_mi
->
rli
.
event_len
+
active_mi
->
rli
.
pending
));
trx
->
mysql_master_log_pos
=
(
ib_longlong
)
#if MYSQL_VERSION_ID < 40100
(
active_mi
->
rli
.
future_master_log_pos
);
#else
(
active_mi
->
rli
.
future_group_master_log_pos
);
#endif
}
trx_commit_for_mysql
(
trx
);
...
...
sql/log_event.cc
View file @
15d8e9d0
...
...
@@ -1792,10 +1792,15 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli)
/*
InnoDB internally stores the master log position it has processed so far;
position to store is really pos + pending + event_len
since we must store the pos of the END of the current log event
position to store is of the END of the current log event.
*/
rli
->
event_len
=
get_event_len
();
#if MYSQL_VERSION_ID < 40100
rli
->
future_master_log_pos
=
log_pos
+
get_event_len
();
#elif MYSQL_VERSION_ID < 50000
rli
->
future_group_master_log_pos
=
log_pos
+
get_event_len
();
#else
rli
->
future_group_master_log_pos
=
log_pos
;
#endif
thd
->
query_error
=
0
;
// clear error
thd
->
clear_error
();
...
...
@@ -1935,6 +1940,17 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
thd
->
query_error
=
0
;
thd
->
clear_error
();
if
(
!
use_rli_only_for_errors
)
{
#if MYSQL_VERSION_ID < 40100
rli
->
future_master_log_pos
=
log_pos
+
get_event_len
();
#elif MYSQL_VERSION_ID < 50000
rli
->
future_group_master_log_pos
=
log_pos
+
get_event_len
();
#else
rli
->
future_group_master_log_pos
=
log_pos
;
#endif
}
/*
We test replicate_*_db rules. Note that we have already prepared the file to
load, even if we are going to ignore and delete it now. So it is possible
...
...
@@ -2392,6 +2408,14 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
lev->exec_event is the place where the table is loaded (it calls
mysql_load()).
*/
#if MYSQL_VERSION_ID < 40100
rli
->
future_master_log_pos
=
log_pos
+
get_event_len
();
#elif MYSQL_VERSION_ID < 50000
rli
->
future_group_master_log_pos
=
log_pos
+
get_event_len
();
#else
rli
->
future_group_master_log_pos
=
log_pos
;
#endif
if
(
lev
->
exec_event
(
0
,
rli
,
1
))
{
/*
...
...
sql/slave.h
View file @
15d8e9d0
...
...
@@ -177,12 +177,16 @@ typedef struct st_relay_log_info
bool
ignore_log_space_limit
;
/*
InnoDB internally stores the master log position it has processed
so far; the position to store is really the sum of
pos + pending + event_len here since we must store the pos of the
END of the current log event
When it commits, InnoDB internally stores the master log position it has
processed so far; the position to store is the one of the end of the
committing event (the COMMIT query event, or the event if in autocommit
mode).
*/
int
event_len
;
#if MYSQL_VERSION_ID < 40100
ulonglong
future_master_log_pos
;
#else
ulonglong
future_group_master_log_pos
;
#endif
/*
Needed for problems when slave stops and we want to restart it
...
...
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