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
15b607b5
Commit
15b607b5
authored
Apr 19, 2024
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
ec7db2bd
4c343394
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
storage/innobase/ibuf/ibuf0ibuf.cc
storage/innobase/ibuf/ibuf0ibuf.cc
+14
-14
storage/innobase/include/btr0pcur.h
storage/innobase/include/btr0pcur.h
+2
-1
storage/innobase/include/mtr0log.h
storage/innobase/include/mtr0log.h
+12
-13
No files found.
storage/innobase/ibuf/ibuf0ibuf.cc
View file @
15b607b5
...
...
@@ -24,6 +24,7 @@ Insert buffer
Created 7/19/1997 Heikki Tuuri
*******************************************************/
#include <tuple>
#include "ibuf0ibuf.h"
#include "btr0sea.h"
...
...
@@ -2323,7 +2324,8 @@ static void ibuf_delete_recs(const page_id_t page_id)
/** Merge the change buffer to some pages. */
static
void
ibuf_read_merge_pages
(
const
uint32_t
*
space_ids
,
const
uint32_t
*
page_nos
,
ulint
n_stored
)
const
uint32_t
*
page_nos
,
ulint
n_stored
,
bool
slow_shutdown_cleanup
)
{
for
(
ulint
i
=
0
;
i
<
n_stored
;
i
++
)
{
const
ulint
space_id
=
space_ids
[
i
];
...
...
@@ -2348,30 +2350,28 @@ static void ibuf_read_merge_pages(const uint32_t* space_ids,
if
(
UNIV_LIKELY
(
page_nos
[
i
]
<
size
))
{
mtr
.
start
();
dberr_t
err
;
buf_block_t
*
block
=
/* Load the page and apply change buffers. */
std
::
ignore
=
buf_page_get_gen
(
page_id_t
(
space_id
,
page_nos
[
i
]),
zip_size
,
RW_X_LATCH
,
nullptr
,
BUF_GET_POSSIBLY_FREED
,
&
mtr
,
&
err
,
true
);
bool
remove
=
!
block
||
fil_page_get_type
(
block
->
page
.
frame
)
!=
FIL_PAGE_INDEX
||
!
page_is_leaf
(
block
->
page
.
frame
);
mtr
.
commit
();
if
(
err
==
DB_TABLESPACE_DELETED
)
{
s
->
x_unlock
();
goto
tablespace_deleted
;
}
if
(
!
remove
)
{
s
->
x_unlock
();
continue
;
}
}
s
->
x_unlock
();
if
(
srv_shutdown_state
==
SRV_SHUTDOWN_NONE
||
srv_fast_shutdown
)
{
/* During slow shutdown cleanup, we apply all pending IBUF
changes and need to cleanup any left-over IBUF records. There
are a few cases when the changes are already discarded and IBUF
bitmap is cleaned but we miss to delete the record. Even after
the issues are fixed, we need to keep this safety measure for
upgraded DBs with such left over records. */
if
(
!
slow_shutdown_cleanup
)
{
continue
;
}
...
...
@@ -2442,7 +2442,7 @@ ATTRIBUTE_COLD ulint ibuf_contract()
space_ids
,
page_nos
,
&
n_pages
);
ibuf_mtr_commit
(
&
mtr
);
ibuf_read_merge_pages
(
space_ids
,
page_nos
,
n_pages
);
ibuf_read_merge_pages
(
space_ids
,
page_nos
,
n_pages
,
true
);
return
(
sum_sizes
+
1
);
}
...
...
@@ -2523,7 +2523,7 @@ ibuf_merge_space(
}
#endif
/* UNIV_DEBUG */
ibuf_read_merge_pages
(
spaces
,
pages
,
n_pages
);
ibuf_read_merge_pages
(
spaces
,
pages
,
n_pages
,
false
);
}
return
(
n_pages
);
...
...
storage/innobase/include/btr0pcur.h
View file @
15b607b5
...
...
@@ -431,7 +431,8 @@ btr_pcur_open(
}
/** Open a cursor on the first user record satisfying the search condition;
in case of no match, after the last index record. */
in case of no match, after the last index record.
@return DB_SUCCESS or error code */
MY_ATTRIBUTE
((
nonnull
,
warn_unused_result
))
inline
dberr_t
...
...
storage/innobase/include/mtr0log.h
View file @
15b607b5
...
...
@@ -347,12 +347,11 @@ inline void mtr_t::memmove(const buf_block_t &b, ulint d, ulint s, ulint len)
ut_ad
(
d
>=
8
);
ut_ad
(
s
>=
8
);
ut_ad
(
len
);
ut_d
(
const
ulint
ps
=
srv_page_size
);
ut_ad
(
s
<=
ps
);
ut_ad
(
s
+
len
<=
ps
);
ut_ad
(
s
<=
ulint
(
srv_page_size
));
ut_ad
(
s
+
len
<=
ulint
(
srv_page_size
));
ut_ad
(
s
!=
d
);
ut_ad
(
d
<=
ps
);
ut_ad
(
d
+
len
<=
ps
);
ut_ad
(
d
<=
ulint
(
srv_page_size
)
);
ut_ad
(
d
+
len
<=
ulint
(
srv_page_size
)
);
set_modified
(
b
);
if
(
!
is_logged
())
...
...
@@ -360,17 +359,17 @@ inline void mtr_t::memmove(const buf_block_t &b, ulint d, ulint s, ulint len)
static_assert
(
MIN_4BYTE
>
UNIV_PAGE_SIZE_MAX
,
"consistency"
);
size_t
lenlen
=
(
len
<
MIN_2BYTE
?
1
:
len
<
MIN_3BYTE
?
2
:
3
);
/* The source offset is encoded relative to the destination offset,
with the sign in the least significant bit.
Because the source offset 0 is not possible, our encoding
subtracts 1 from the offset. */
const
uint16_t
S
=
s
>
d
?
uint16_t
((
s
-
d
-
1
)
<<
1
)
:
uint16_t
((
d
-
s
-
1
)
<<
1
|
1
);
with the sign in the least significant bit. */
if
(
s
>
d
)
s
=
(
s
-
d
)
<<
1
;
else
s
=
(
d
-
s
)
<<
1
|
1
;
/* The source offset 0 is not possible. */
size_t
slen
=
(
S
<
MIN_2BYTE
?
1
:
S
<
MIN_3BYTE
?
2
:
3
);
s
-=
1
<<
1
;
size_t
slen
=
(
s
<
MIN_2BYTE
?
1
:
s
<
MIN_3BYTE
?
2
:
3
);
byte
*
l
=
log_write
<
MEMMOVE
>
(
b
.
page
.
id
(),
&
b
.
page
,
lenlen
+
slen
,
true
,
d
);
l
=
mlog_encode_varint
(
l
,
len
);
l
=
mlog_encode_varint
(
l
,
S
);
l
=
mlog_encode_varint
(
l
,
s
);
m_log
.
close
(
l
);
m_last_offset
=
static_cast
<
uint16_t
>
(
d
+
len
);
}
...
...
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