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
4a0612ed
Commit
4a0612ed
authored
May 11, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop binlog background thread together with others
that fixes many rpl tests failures
parent
562c1df7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
sql/log.cc
sql/log.cc
+17
-11
sql/log.h
sql/log.h
+2
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-0
No files found.
sql/log.cc
View file @
4a0612ed
...
...
@@ -3171,6 +3171,21 @@ MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
bzero
((
char
*
)
&
purge_index_file
,
sizeof
(
purge_index_file
));
}
void
MYSQL_BIN_LOG
::
stop_background_thread
()
{
if
(
binlog_background_thread_started
)
{
mysql_mutex_lock
(
&
LOCK_binlog_background_thread
);
binlog_background_thread_stop
=
true
;
mysql_cond_signal
(
&
COND_binlog_background_thread
);
while
(
binlog_background_thread_stop
)
mysql_cond_wait
(
&
COND_binlog_background_thread_end
,
&
LOCK_binlog_background_thread
);
mysql_mutex_unlock
(
&
LOCK_binlog_background_thread
);
binlog_background_thread_started
=
false
;
}
}
/* this is called only once */
void
MYSQL_BIN_LOG
::
cleanup
()
...
...
@@ -3181,17 +3196,8 @@ void MYSQL_BIN_LOG::cleanup()
xid_count_per_binlog
*
b
;
/* Wait for the binlog background thread to stop. */
if
(
!
is_relay_log
&&
binlog_background_thread_started
)
{
mysql_mutex_lock
(
&
LOCK_binlog_background_thread
);
binlog_background_thread_stop
=
true
;
mysql_cond_signal
(
&
COND_binlog_background_thread
);
while
(
binlog_background_thread_stop
)
mysql_cond_wait
(
&
COND_binlog_background_thread_end
,
&
LOCK_binlog_background_thread
);
mysql_mutex_unlock
(
&
LOCK_binlog_background_thread
);
binlog_background_thread_started
=
false
;
}
if
(
!
is_relay_log
)
stop_background_thread
();
inited
=
0
;
close
(
LOG_CLOSE_INDEX
|
LOG_CLOSE_STOP_EVENT
);
...
...
sql/log.h
View file @
4a0612ed
...
...
@@ -589,6 +589,8 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
mysql_cond_t
COND_binlog_background_thread
;
mysql_cond_t
COND_binlog_background_thread_end
;
void
stop_background_thread
();
using
MYSQL_LOG
::
generate_name
;
using
MYSQL_LOG
::
is_open
;
...
...
sql/mysqld.cc
View file @
4a0612ed
...
...
@@ -1717,6 +1717,7 @@ static void close_connections(void)
Events
::
deinit
();
end_slave
();
mysql_bin_log
.
stop_background_thread
();
/*
Give threads time to die.
...
...
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