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
616271b7
Commit
616271b7
authored
Sep 01, 2016
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: MDL_context::wsrep_get_thd() is no longer needed
parent
16702ec9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
sql/mdl.cc
sql/mdl.cc
+10
-10
sql/mdl.h
sql/mdl.h
+0
-1
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+2
-2
No files found.
sql/mdl.cc
View file @
616271b7
...
...
@@ -1533,7 +1533,7 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket)
DBUG_ASSERT
(
ticket
->
get_lock
());
#ifdef WITH_WSREP
if
((
this
==
&
(
ticket
->
get_lock
()
->
m_waiting
))
&&
wsrep_thd_is_BF
((
void
*
)(
ticket
->
get_ctx
()
->
wsrep_
get_thd
()),
false
))
wsrep_thd_is_BF
((
void
*
)(
ticket
->
get_ctx
()
->
get_thd
()),
false
))
{
Ticket_iterator
itw
(
ticket
->
get_lock
()
->
m_waiting
);
Ticket_iterator
itg
(
ticket
->
get_lock
()
->
m_granted
);
...
...
@@ -1544,11 +1544,11 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket)
while
((
waiting
=
itw
++
)
&&
!
added
)
{
if
(
!
wsrep_thd_is_BF
((
void
*
)(
waiting
->
get_ctx
()
->
wsrep_
get_thd
()),
true
))
if
(
!
wsrep_thd_is_BF
((
void
*
)(
waiting
->
get_ctx
()
->
get_thd
()),
true
))
{
WSREP_DEBUG
(
"MDL add_ticket inserted before: %lu %s"
,
wsrep_thd_thread_id
(
waiting
->
get_ctx
()
->
wsrep_
get_thd
()),
wsrep_thd_query
(
waiting
->
get_ctx
()
->
wsrep_
get_thd
()));
wsrep_thd_thread_id
(
waiting
->
get_ctx
()
->
get_thd
()),
wsrep_thd_query
(
waiting
->
get_ctx
()
->
get_thd
()));
/* Insert the ticket before the first non-BF waiting thd. */
m_list
.
insert_after
(
prev
,
ticket
);
added
=
true
;
...
...
@@ -1949,12 +1949,12 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
ticket
->
is_incompatible_when_granted
(
type_arg
))
#ifdef WITH_WSREP
{
if
(
wsrep_thd_is_BF
((
void
*
)(
requestor_ctx
->
wsrep_
get_thd
()),
false
)
&&
if
(
wsrep_thd_is_BF
((
void
*
)(
requestor_ctx
->
get_thd
()),
false
)
&&
key
.
mdl_namespace
()
==
MDL_key
::
GLOBAL
)
{
WSREP_DEBUG
(
"global lock granted for BF: %lu %s"
,
wsrep_thd_thread_id
(
requestor_ctx
->
wsrep_get_thd
()),
wsrep_thd_query
(
requestor_ctx
->
wsrep_
get_thd
()));
wsrep_thd_thread_id
(
requestor_ctx
->
get_thd
()),
wsrep_thd_query
(
requestor_ctx
->
get_thd
()));
can_grant
=
true
;
}
else
if
(
!
wsrep_grant_mdl_exception
(
requestor_ctx
,
ticket
,
&
key
))
...
...
@@ -1990,12 +1990,12 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
#ifdef WITH_WSREP
else
{
if
(
wsrep_thd_is_BF
((
void
*
)(
requestor_ctx
->
wsrep_
get_thd
()),
false
)
&&
if
(
wsrep_thd_is_BF
((
void
*
)(
requestor_ctx
->
get_thd
()),
false
)
&&
key
.
mdl_namespace
()
==
MDL_key
::
GLOBAL
)
{
WSREP_DEBUG
(
"global lock granted for BF (waiting queue): %lu %s"
,
wsrep_thd_thread_id
(
requestor_ctx
->
wsrep_get_thd
()),
wsrep_thd_query
(
requestor_ctx
->
wsrep_
get_thd
()));
wsrep_thd_thread_id
(
requestor_ctx
->
get_thd
()),
wsrep_thd_query
(
requestor_ctx
->
get_thd
()));
can_grant
=
true
;
}
}
...
...
sql/mdl.h
View file @
616271b7
...
...
@@ -933,7 +933,6 @@ class MDL_context
public:
#ifdef WITH_WSREP
THD
*
wsrep_get_thd
()
const
{
return
get_thd
();
}
bool
wsrep_has_explicit_locks
();
#endif
/* WITH_WSREP */
THD
*
get_thd
()
const
{
return
m_owner
->
get_thd
();
}
...
...
sql/wsrep_mysqld.cc
View file @
616271b7
...
...
@@ -1520,8 +1520,8 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
/* Fallback to the non-wsrep behaviour */
if
(
!
WSREP_ON
)
return
FALSE
;
THD
*
request_thd
=
requestor_ctx
->
wsrep_
get_thd
();
THD
*
granted_thd
=
ticket
->
get_ctx
()
->
wsrep_
get_thd
();
THD
*
request_thd
=
requestor_ctx
->
get_thd
();
THD
*
granted_thd
=
ticket
->
get_ctx
()
->
get_thd
();
bool
ret
=
FALSE
;
const
char
*
schema
=
key
->
db_name
();
...
...
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