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
061e01a0
Commit
061e01a0
authored
Apr 20, 2007
by
vasil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix phantom reads (
http://bugs.mysql.com/27197
) following Heikki's
patch in the bug followup. Approved by: Heikki
parent
e2374e8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
row/row0sel.c
row/row0sel.c
+26
-0
No files found.
row/row0sel.c
View file @
061e01a0
...
...
@@ -3619,6 +3619,32 @@ shortcut_fails_too_big_rec:
pcur
,
0
,
&
mtr
);
pcur
->
trx_if_known
=
trx
;
rec
=
btr_pcur_get_rec
(
pcur
);
if
(
!
moves_up
&&
!
page_rec_is_supremum
(
rec
)
&&
set_also_gap_locks
&&
!
(
srv_locks_unsafe_for_binlog
||
trx
->
isolation_level
==
TRX_ISO_READ_COMMITTED
)
&&
prebuilt
->
select_lock_type
!=
LOCK_NONE
)
{
/* Try to place a gap lock on the next index record
to prevent phantoms in ORDER BY ... DESC queries */
offsets
=
rec_get_offsets
(
page_rec_get_next
(
rec
),
index
,
offsets
,
ULINT_UNDEFINED
,
&
heap
);
err
=
sel_set_rec_lock
(
page_rec_get_next
(
rec
),
index
,
offsets
,
prebuilt
->
select_lock_type
,
LOCK_GAP
,
thr
);
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
}
}
}
else
{
if
(
mode
==
PAGE_CUR_G
)
{
btr_pcur_open_at_index_side
(
...
...
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