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
7f504c72
Commit
7f504c72
authored
Dec 07, 2016
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.2-vats' of
https://github.com/sensssz/server
into sensssz-10.2-vats
parents
33719043
02c88523
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+5
-2
No files found.
storage/innobase/lock/lock0lock.cc
View file @
7f504c72
...
@@ -1754,9 +1754,9 @@ RecLock::lock_alloc(
...
@@ -1754,9 +1754,9 @@ RecLock::lock_alloc(
/*********************************************************************//**
/*********************************************************************//**
Check if lock1 has higher priority than lock2.
Check if lock1 has higher priority than lock2.
NULL has lowest priority.
NULL has lowest priority.
If either is a high priority transaction, the lock has higher priority.
If neither of them is wait lock, the first one has higher priority.
If neither of them is wait lock, the first one has higher priority.
If only one of them is a wait lock, it has lower priority.
If only one of them is a wait lock, it has lower priority.
If either is a high priority transaction, the lock has higher priority.
Otherwise, the one with an older transaction has higher priority.
Otherwise, the one with an older transaction has higher priority.
@returns true if lock1 has higher priority, false otherwise. */
@returns true if lock1 has higher priority, false otherwise. */
bool
bool
...
@@ -1769,12 +1769,15 @@ has_higher_priority(
...
@@ -1769,12 +1769,15 @@ has_higher_priority(
}
else
if
(
lock2
==
NULL
)
{
}
else
if
(
lock2
==
NULL
)
{
return
true
;
return
true
;
}
}
//
No preference. Compre them by wait mode and trx age
.
//
Granted locks has higher priority
.
if
(
!
lock_get_wait
(
lock1
))
{
if
(
!
lock_get_wait
(
lock1
))
{
return
true
;
return
true
;
}
else
if
(
!
lock_get_wait
(
lock2
))
{
}
else
if
(
!
lock_get_wait
(
lock2
))
{
return
false
;
return
false
;
}
}
if
(
trx_is_high_priority
(
lock1
->
trx
))
{
return
false
;
}
return
lock1
->
trx
->
start_time_micro
<=
lock2
->
trx
->
start_time_micro
;
return
lock1
->
trx
->
start_time_micro
<=
lock2
->
trx
->
start_time_micro
;
}
}
...
...
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