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
68249bbb
Commit
68249bbb
authored
Jul 30, 2004
by
guilhem@mysql.com
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
0c3109fc
9275a701
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
sql/log.cc
sql/log.cc
+0
-1
sql/sql_class.cc
sql/sql_class.cc
+11
-1
sql/sql_class.h
sql/sql_class.h
+1
-0
No files found.
sql/log.cc
View file @
68249bbb
...
@@ -1544,7 +1544,6 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
...
@@ -1544,7 +1544,6 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
void
MYSQL_LOG
::
wait_for_update
(
THD
*
thd
,
bool
master_or_slave
)
void
MYSQL_LOG
::
wait_for_update
(
THD
*
thd
,
bool
master_or_slave
)
{
{
safe_mutex_assert_owner
(
&
LOCK_log
);
const
char
*
old_msg
=
thd
->
enter_cond
(
&
update_cond
,
&
LOCK_log
,
const
char
*
old_msg
=
thd
->
enter_cond
(
&
update_cond
,
&
LOCK_log
,
master_or_slave
?
master_or_slave
?
"Has read all relay log; waiting for \
"Has read all relay log; waiting for \
...
...
sql/sql_class.cc
View file @
68249bbb
...
@@ -299,8 +299,18 @@ void THD::awake(bool prepare_to_die)
...
@@ -299,8 +299,18 @@ void THD::awake(bool prepare_to_die)
exits the cond in the time between read and broadcast, but that is
exits the cond in the time between read and broadcast, but that is
ok since all we want to do is to make the victim thread get out
ok since all we want to do is to make the victim thread get out
of waiting on current_cond.
of waiting on current_cond.
If we see a non-zero current_cond: it cannot be an old value (because
then exit_cond() should have run and it can't because we have mutex); so
it is the true value but maybe current_mutex is not yet non-zero (we're
in the middle of enter_cond() and there is a "memory order
inversion"). So we test the mutex too to not lock 0.
Note that there is a small chance we fail to kill. If victim has locked
current_mutex, and hasn't entered enter_cond(), then we don't know it's
going to wait on cond. Then victim goes into its cond "forever" (until
we issue a second KILL). True we have set its thd->killed but it may not
see it immediately and so may have time to reach the cond_wait().
*/
*/
if
(
mysys_var
->
current_cond
)
if
(
mysys_var
->
current_cond
&&
mysys_var
->
current_mutex
)
{
{
pthread_mutex_lock
(
mysys_var
->
current_mutex
);
pthread_mutex_lock
(
mysys_var
->
current_mutex
);
pthread_cond_broadcast
(
mysys_var
->
current_cond
);
pthread_cond_broadcast
(
mysys_var
->
current_cond
);
...
...
sql/sql_class.h
View file @
68249bbb
...
@@ -539,6 +539,7 @@ class THD :public ilink
...
@@ -539,6 +539,7 @@ class THD :public ilink
const
char
*
msg
)
const
char
*
msg
)
{
{
const
char
*
old_msg
=
proc_info
;
const
char
*
old_msg
=
proc_info
;
safe_mutex_assert_owner
(
mutex
);
mysys_var
->
current_mutex
=
mutex
;
mysys_var
->
current_mutex
=
mutex
;
mysys_var
->
current_cond
=
cond
;
mysys_var
->
current_cond
=
cond
;
proc_info
=
msg
;
proc_info
=
msg
;
...
...
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