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
22fa171c
Commit
22fa171c
authored
Nov 23, 2001
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
parents
a2a838f8
82a7b0f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
sql/sql_repl.cc
sql/sql_repl.cc
+4
-7
sql/sql_repl.h
sql/sql_repl.h
+7
-0
No files found.
sql/sql_repl.cc
View file @
22fa171c
...
@@ -602,16 +602,13 @@ int stop_slave(THD* thd, bool net_report )
...
@@ -602,16 +602,13 @@ int stop_slave(THD* thd, bool net_report )
if
(
slave_running
)
if
(
slave_running
)
{
{
abort_slave
=
1
;
abort_slave
=
1
;
thr_alarm_kill
(
slave_real_id
);
KICK_SLAVE
;
#ifdef SIGNAL_WITH_VIO_CLOSE
slave_thd
->
close_active_vio
();
#endif
// do not abort the slave in the middle of a query, so we do not set
// do not abort the slave in the middle of a query, so we do not set
// thd->killed for the slave thread
// thd->killed for the slave thread
thd
->
proc_info
=
"waiting for slave to die"
;
thd
->
proc_info
=
"waiting for slave to die"
;
while
(
slave_running
)
while
(
slave_running
)
{
{
/* there is a small chan
g
e that slave thread might miss the first
/* there is a small chan
c
e that slave thread might miss the first
alarm. To protect againts it, resend the signal until it reacts
alarm. To protect againts it, resend the signal until it reacts
*/
*/
...
@@ -630,7 +627,7 @@ int stop_slave(THD* thd, bool net_report )
...
@@ -630,7 +627,7 @@ int stop_slave(THD* thd, bool net_report )
#endif
#endif
pthread_cond_timedwait
(
&
COND_slave_stopped
,
&
LOCK_slave
,
&
abstime
);
pthread_cond_timedwait
(
&
COND_slave_stopped
,
&
LOCK_slave
,
&
abstime
);
if
(
slave_running
)
if
(
slave_running
)
thr_alarm_kill
(
slave_real_id
)
;
KICK_SLAVE
;
}
}
}
}
else
else
...
@@ -716,7 +713,7 @@ int change_master(THD* thd)
...
@@ -716,7 +713,7 @@ int change_master(THD* thd)
if
((
slave_was_running
=
slave_running
))
if
((
slave_was_running
=
slave_running
))
{
{
abort_slave
=
1
;
abort_slave
=
1
;
thr_alarm_kill
(
slave_real_id
)
;
KICK_SLAVE
;
thd
->
proc_info
=
"waiting for slave to die"
;
thd
->
proc_info
=
"waiting for slave to die"
;
while
(
slave_running
)
while
(
slave_running
)
pthread_cond_wait
(
&
COND_slave_stopped
,
&
LOCK_slave
);
// wait until done
pthread_cond_wait
(
&
COND_slave_stopped
,
&
LOCK_slave
);
// wait until done
...
...
sql/sql_repl.h
View file @
22fa171c
...
@@ -14,6 +14,13 @@ extern int max_binlog_dump_events;
...
@@ -14,6 +14,13 @@ extern int max_binlog_dump_events;
extern
bool
opt_sporadic_binlog_dump_fail
;
extern
bool
opt_sporadic_binlog_dump_fail
;
#endif
#endif
#ifdef SIGNAL_WITH_VIO_CLOSE
#define KICK_SLAVE { slave_thd->close_active_vio(); \
thr_alarm_kill(slave_real_id); }
#else
#define KICK_SLAVE thr_alarm_kill(slave_real_id);
#endif
File
open_binlog
(
IO_CACHE
*
log
,
const
char
*
log_file_name
,
File
open_binlog
(
IO_CACHE
*
log
,
const
char
*
log_file_name
,
const
char
**
errmsg
);
const
char
**
errmsg
);
...
...
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