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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ba7dec4a
Commit
ba7dec4a
authored
Sep 17, 2010
by
Marc Alff
Browse files
Options
Browse Files
Download
Plain Diff
local merge
parents
fd6497b3
77dcf9be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
sql/log.cc
sql/log.cc
+1
-4
sql/log.h
sql/log.h
+1
-0
sql/sql_repl.cc
sql/sql_repl.cc
+13
-3
No files found.
sql/log.cc
View file @
ba7dec4a
...
...
@@ -5284,11 +5284,8 @@ int MYSQL_BIN_LOG::wait_for_update_bin_log(THD* thd,
const
struct
timespec
*
timeout
)
{
int
ret
=
0
;
const
char
*
old_msg
=
thd
->
proc_info
;
DBUG_ENTER
(
"wait_for_update_bin_log"
);
old_msg
=
thd
->
enter_cond
(
&
update_cond
,
&
LOCK_log
,
"Master has sent all binlog to slave; "
"waiting for binlog to be updated"
);
if
(
!
timeout
)
mysql_cond_wait
(
&
update_cond
,
&
LOCK_log
);
else
...
...
sql/log.h
View file @
ba7dec4a
...
...
@@ -460,6 +460,7 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
inline
char
*
get_log_fname
()
{
return
log_file_name
;
}
inline
char
*
get_name
()
{
return
name
;
}
inline
mysql_mutex_t
*
get_log_lock
()
{
return
&
LOCK_log
;
}
inline
mysql_cond_t
*
get_log_cond
()
{
return
&
update_cond
;
}
inline
IO_CACHE
*
get_log_file
()
{
return
&
log_file
;
}
inline
void
lock_index
()
{
mysql_mutex_lock
(
&
LOCK_index
);}
...
...
sql/sql_repl.cc
View file @
ba7dec4a
...
...
@@ -448,6 +448,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
const
char
*
errmsg
=
"Unknown error"
;
NET
*
net
=
&
thd
->
net
;
mysql_mutex_t
*
log_lock
;
mysql_cond_t
*
log_cond
;
bool
binlog_can_be_corrupted
=
FALSE
;
#ifndef DBUG_OFF
int
left_events
=
max_binlog_dump_events
;
...
...
@@ -591,7 +593,8 @@ impossible position";
mysql_bin_log, and it's already inited, and it will be destroyed
only at shutdown).
*/
log_lock
=
mysql_bin_log
.
get_log_lock
();
log_lock
=
mysql_bin_log
.
get_log_lock
();
log_cond
=
mysql_bin_log
.
get_log_cond
();
if
(
pos
>
BIN_LOG_HEADER_SIZE
)
{
/* reset transmit packet for the event read from binary log
...
...
@@ -826,6 +829,7 @@ impossible position";
#ifndef DBUG_OFF
ulong
hb_info_counter
=
0
;
#endif
const
char
*
old_msg
=
thd
->
proc_info
;
signal_cnt
=
mysql_bin_log
.
signal_cnt
;
do
{
...
...
@@ -834,6 +838,9 @@ impossible position";
DBUG_ASSERT
(
heartbeat_ts
&&
heartbeat_period
!=
0
);
set_timespec_nsec
(
*
heartbeat_ts
,
heartbeat_period
);
}
thd
->
enter_cond
(
log_cond
,
log_lock
,
"Master has sent all binlog to slave; "
"waiting for binlog to be updated"
);
ret
=
mysql_bin_log
.
wait_for_update_bin_log
(
thd
,
heartbeat_ts
);
DBUG_ASSERT
(
ret
==
0
||
(
heartbeat_period
!=
0
&&
coord
!=
NULL
));
if
(
ret
==
ETIMEDOUT
||
ret
==
ETIME
)
...
...
@@ -849,12 +856,15 @@ impossible position";
#endif
/* reset transmit packet for the heartbeat event */
if
(
reset_transmit_packet
(
thd
,
flags
,
&
ev_offset
,
&
errmsg
))
{
thd
->
exit_cond
(
old_msg
);
goto
err
;
}
if
(
send_heartbeat_event
(
net
,
packet
,
coord
))
{
errmsg
=
"Failed on my_net_write()"
;
my_errno
=
ER_UNKNOWN_ERROR
;
mysql_mutex_unlock
(
log_lock
);
thd
->
exit_cond
(
old_msg
);
goto
err
;
}
}
...
...
@@ -863,7 +873,7 @@ impossible position";
DBUG_PRINT
(
"wait"
,(
"binary log received update or a broadcast signal caught"
));
}
}
while
(
signal_cnt
==
mysql_bin_log
.
signal_cnt
&&
!
thd
->
killed
);
mysql_mutex_unlock
(
log_lock
);
thd
->
exit_cond
(
old_msg
);
}
break
;
...
...
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