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
5efe0e4a
Commit
5efe0e4a
authored
Feb 28, 2007
by
rafal@quant.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into quant.(none):/ext/mysql/bk/mysql-5.0-bug25306
parents
6889569f
235ca912
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
sql/slave.cc
sql/slave.cc
+14
-5
sql/sql_repl.cc
sql/sql_repl.cc
+5
-3
No files found.
sql/slave.cc
View file @
5efe0e4a
...
@@ -3759,8 +3759,13 @@ err:
...
@@ -3759,8 +3759,13 @@ err:
mi
->
abort_slave
=
0
;
mi
->
abort_slave
=
0
;
mi
->
slave_running
=
0
;
mi
->
slave_running
=
0
;
mi
->
io_thd
=
0
;
mi
->
io_thd
=
0
;
pthread_mutex_unlock
(
&
mi
->
run_lock
);
/*
Note: the order of the two following calls (first broadcast, then unlock)
is important. Otherwise a killer_thread can execute between the calls and
delete the mi structure leading to a crash! (see BUG#25306 for details)
*/
pthread_cond_broadcast
(
&
mi
->
stop_cond
);
// tell the world we are done
pthread_cond_broadcast
(
&
mi
->
stop_cond
);
// tell the world we are done
pthread_mutex_unlock
(
&
mi
->
run_lock
);
#ifndef DBUG_OFF
#ifndef DBUG_OFF
if
(
abort_slave_event_count
&&
!
events_till_abort
)
if
(
abort_slave_event_count
&&
!
events_till_abort
)
goto
slave_begin
;
goto
slave_begin
;
...
@@ -3978,8 +3983,13 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
...
@@ -3978,8 +3983,13 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
THD_CHECK_SENTRY
(
thd
);
THD_CHECK_SENTRY
(
thd
);
delete
thd
;
delete
thd
;
pthread_mutex_unlock
(
&
LOCK_thread_count
);
pthread_mutex_unlock
(
&
LOCK_thread_count
);
pthread_cond_broadcast
(
&
rli
->
stop_cond
);
/*
Note: the order of the broadcast and unlock calls below (first broadcast, then unlock)
is important. Otherwise a killer_thread can execute between the calls and
delete the mi structure leading to a crash! (see BUG#25306 for details)
*/
pthread_cond_broadcast
(
&
rli
->
stop_cond
);
#ifndef DBUG_OFF
#ifndef DBUG_OFF
/*
/*
Bug #19938 Valgrind error (race) in handle_slave_sql()
Bug #19938 Valgrind error (race) in handle_slave_sql()
...
@@ -3987,9 +3997,8 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
...
@@ -3987,9 +3997,8 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
*/
*/
const
int
eta
=
rli
->
events_till_abort
;
const
int
eta
=
rli
->
events_till_abort
;
#endif
#endif
pthread_mutex_unlock
(
&
rli
->
run_lock
);
// tell the world we are done
// tell the world we are done
pthread_mutex_unlock
(
&
rli
->
run_lock
);
#ifndef DBUG_OFF // TODO: reconsider the code below
#ifndef DBUG_OFF // TODO: reconsider the code below
if
(
abort_slave_event_count
&&
!
eta
)
if
(
abort_slave_event_count
&&
!
eta
)
goto
slave_begin
;
goto
slave_begin
;
...
...
sql/sql_repl.cc
View file @
5efe0e4a
...
@@ -882,12 +882,14 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
...
@@ -882,12 +882,14 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
int
stop_slave
(
THD
*
thd
,
MASTER_INFO
*
mi
,
bool
net_report
)
int
stop_slave
(
THD
*
thd
,
MASTER_INFO
*
mi
,
bool
net_report
)
{
{
DBUG_ENTER
(
"stop_slave"
);
int
slave_errno
;
int
slave_errno
;
if
(
!
thd
)
if
(
!
thd
)
thd
=
current_thd
;
thd
=
current_thd
;
if
(
check_access
(
thd
,
SUPER_ACL
,
any_db
,
0
,
0
,
0
,
0
))
if
(
check_access
(
thd
,
SUPER_ACL
,
any_db
,
0
,
0
,
0
,
0
))
return
1
;
DBUG_RETURN
(
1
)
;
thd
->
proc_info
=
"Killing slave"
;
thd
->
proc_info
=
"Killing slave"
;
int
thread_mask
;
int
thread_mask
;
lock_slave_threads
(
mi
);
lock_slave_threads
(
mi
);
...
@@ -921,12 +923,12 @@ int stop_slave(THD* thd, MASTER_INFO* mi, bool net_report )
...
@@ -921,12 +923,12 @@ int stop_slave(THD* thd, MASTER_INFO* mi, bool net_report )
{
{
if
(
net_report
)
if
(
net_report
)
my_message
(
slave_errno
,
ER
(
slave_errno
),
MYF
(
0
));
my_message
(
slave_errno
,
ER
(
slave_errno
),
MYF
(
0
));
return
1
;
DBUG_RETURN
(
1
)
;
}
}
else
if
(
net_report
)
else
if
(
net_report
)
send_ok
(
thd
);
send_ok
(
thd
);
return
0
;
DBUG_RETURN
(
0
)
;
}
}
...
...
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