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
2728a319
Commit
2728a319
authored
Jul 31, 2024
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '11.1' into bb-11.1-release
parents
1de570d7
7ead48a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
17 deletions
+8
-17
storage/innobase/btr/btr0cur.cc
storage/innobase/btr/btr0cur.cc
+3
-5
storage/innobase/btr/btr0pcur.cc
storage/innobase/btr/btr0pcur.cc
+5
-12
No files found.
storage/innobase/btr/btr0cur.cc
View file @
2728a319
...
...
@@ -1301,11 +1301,9 @@ dberr_t btr_cur_t::search_leaf(const dtuple_t *tuple, page_cur_mode_t mode,
}
switch
(
latch_mode
)
{
case
BTR_SEARCH_PREV
:
static_assert
(
BTR_SEARCH_PREV
&
BTR_SEARCH_LEAF
,
""
);
case
BTR_SEARCH_PREV
:
/* btr_pcur_move_to_prev() */
ut_ad
(
!
latch_by_caller
);
ut_ad
(
rw_latch
==
rw_lock_type_t
(
latch_mode
&
(
RW_X_LATCH
|
RW_S_LATCH
)));
ut_ad
(
rw_latch
==
RW_S_LATCH
);
/* latch also siblings from left to right */
if
(
page_has_prev
(
block
->
page
.
frame
)
&&
...
...
@@ -1479,7 +1477,7 @@ dberr_t btr_cur_t::search_leaf(const dtuple_t *tuple, page_cur_mode_t mode,
rw_latch
=
RW_X_LATCH
;
break
;
case
BTR_SEARCH_PREV
:
/* btr_pcur_move_to_prev() */
ut_ad
(
rw_latch
==
RW_S_LATCH
||
rw_latch
==
RW_X_LATCH
);
ut_ad
(
rw_latch
==
RW_S_LATCH
);
if
(
!
not_first_access
)
buf_read_ahead_linear
(
page_id
,
zip_size
);
...
...
storage/innobase/btr/btr0pcur.cc
View file @
2728a319
...
...
@@ -336,10 +336,9 @@ btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr)
ut_a
(
old_n_core_fields
<=
index
->
n_core_fields
);
ut_a
(
old_n_fields
);
static_assert
(
BTR_SEARCH_PREV
==
(
4
|
BTR_SEARCH_LEAF
),
""
);
static_assert
(
int
{
BTR_SEARCH_PREV
}
==
(
4
|
BTR_SEARCH_LEAF
),
""
);
switch
(
restore_latch_mode
|
4
)
{
case
BTR_SEARCH_PREV
:
if
((
restore_latch_mode
|
4
)
==
BTR_SEARCH_PREV
)
{
/* Try optimistic restoration. */
if
(
btr_pcur_optimistic_latch_leaves
(
this
,
&
restore_latch_mode
,
mtr
))
{
...
...
@@ -561,19 +560,13 @@ btr_pcur_move_backward_from_page(
ut_ad
(
btr_pcur_is_before_first_on_page
(
cursor
));
ut_ad
(
!
btr_pcur_is_before_first_in_tree
(
cursor
));
const
auto
latch_mode
=
cursor
->
latch_mode
;
ut_ad
(
latch_mode
==
BTR_SEARCH_LEAF
||
latch_mode
==
BTR_MODIFY_LEAF
);
btr_pcur_store_position
(
cursor
,
mtr
);
mtr_commit
(
mtr
);
mtr_start
(
mtr
);
static_assert
(
BTR_SEARCH_PREV
==
(
4
|
BTR_SEARCH_LEAF
),
""
);
if
(
UNIV_UNLIKELY
(
cursor
->
restore_position
(
btr_latch_mode
(
4
|
latch_mode
),
mtr
)
if
(
UNIV_UNLIKELY
(
cursor
->
restore_position
(
BTR_SEARCH_PREV
,
mtr
)
==
btr_pcur_t
::
CORRUPTED
))
{
return
true
;
}
...
...
@@ -605,7 +598,7 @@ btr_pcur_move_backward_from_page(
mtr
->
rollback_to_savepoint
(
1
);
ut_ad
(
block
==
mtr
->
at_savepoint
(
0
));
cursor
->
latch_mode
=
latch_mode
;
cursor
->
latch_mode
=
BTR_SEARCH_LEAF
;
cursor
->
old_rec
=
nullptr
;
return
false
;
}
...
...
@@ -622,7 +615,7 @@ btr_pcur_move_to_prev(
mtr_t
*
mtr
)
/*!< in: mtr */
{
ut_ad
(
cursor
->
pos_state
==
BTR_PCUR_IS_POSITIONED
);
ut_ad
(
cursor
->
latch_mode
!=
BTR_NO_LATCHES
);
ut_ad
(
cursor
->
latch_mode
==
BTR_SEARCH_LEAF
);
cursor
->
old_rec
=
nullptr
;
...
...
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