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
717e3b3c
Commit
717e3b3c
authored
May 11, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.6 into 10.9
parents
2763f733
c2710572
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
storage/innobase/buf/buf0rea.cc
storage/innobase/buf/buf0rea.cc
+17
-8
No files found.
storage/innobase/buf/buf0rea.cc
View file @
717e3b3c
...
...
@@ -525,7 +525,7 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
/* We will check that almost all pages in the area have been accessed
in the desired order. */
const
bool
descending
=
page_id
=
=
low
;
const
bool
descending
=
page_id
!
=
low
;
if
(
!
descending
&&
page_id
!=
high_1
)
/* This is not a border page of the area */
...
...
@@ -555,7 +555,7 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
uint32_t
{
buf_pool
.
read_ahead_area
});
page_id_t
new_low
=
low
,
new_high_1
=
high_1
;
unsigned
prev_accessed
=
0
;
for
(
page_id_t
i
=
low
;
i
!
=
high_1
;
++
i
)
for
(
page_id_t
i
=
low
;
i
<
=
high_1
;
++
i
)
{
buf_pool_t
::
hash_chain
&
chain
=
buf_pool
.
page_hash
.
cell_get
(
i
.
fold
());
transactional_shared_lock_guard
<
page_hash_latch
>
g
...
...
@@ -583,12 +583,21 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
if
(
prev
==
FIL_NULL
||
next
==
FIL_NULL
)
goto
fail
;
page_id_t
id
=
page_id
;
if
(
descending
&&
next
-
1
==
page_id
.
page_no
())
if
(
descending
)
{
if
(
id
==
high_1
)
++
id
;
else
if
(
next
-
1
!=
page_id
.
page_no
())
goto
fail
;
else
id
.
set_page_no
(
prev
);
else
if
(
!
descending
&&
prev
+
1
==
page_id
.
page_no
())
id
.
set_page_no
(
next
);
}
else
goto
fail
;
/* Successor or predecessor not in the right order */
{
if
(
prev
+
1
!=
page_id
.
page_no
())
goto
fail
;
id
.
set_page_no
(
next
);
}
new_low
=
id
-
(
id
.
page_no
()
%
buf_read_ahead_area
);
new_high_1
=
new_low
+
(
buf_read_ahead_area
-
1
);
...
...
@@ -620,7 +629,7 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
/* If we got this far, read-ahead can be sensible: do it */
count
=
0
;
for
(
ulint
ibuf_mode
=
ibuf
?
BUF_READ_IBUF_PAGES_ONLY
:
BUF_READ_ANY_PAGE
;
new_low
!
=
new_high_1
;
++
new_low
)
new_low
<
=
new_high_1
;
++
new_low
)
{
if
(
ibuf_bitmap_page
(
new_low
,
zip_size
))
continue
;
...
...
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