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
9c5600ad
Commit
9c5600ad
authored
Nov 21, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
0ead2031
de31ca6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
storage/innobase/trx/trx0purge.cc
storage/innobase/trx/trx0purge.cc
+13
-3
No files found.
storage/innobase/trx/trx0purge.cc
View file @
9c5600ad
...
...
@@ -349,14 +349,21 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
}
/** Free an undo log segment.
@param block rollback segment header page
@param rseg_hdr rollback segment header page
@param block undo segment header page
@param mtr mini-transaction */
static
void
trx_purge_free_segment
(
buf_block_t
*
block
,
mtr_t
&
mtr
)
static
void
trx_purge_free_segment
(
buf_block_t
*
rseg_hdr
,
buf_block_t
*
block
,
mtr_t
&
mtr
)
{
ut_ad
(
mtr
.
memo_contains_flagged
(
rseg_hdr
,
MTR_MEMO_PAGE_X_FIX
));
ut_ad
(
mtr
.
memo_contains_flagged
(
block
,
MTR_MEMO_PAGE_X_FIX
));
while
(
!
fseg_free_step_not_header
(
TRX_UNDO_SEG_HDR
+
TRX_UNDO_FSEG_HEADER
+
block
->
page
.
frame
,
&
mtr
))
{
rseg_hdr
->
fix
();
block
->
fix
();
ut_d
(
const
page_id_t
rseg_hdr_id
{
rseg_hdr
->
page
.
id
()});
ut_d
(
const
page_id_t
id
{
block
->
page
.
id
()});
mtr
.
commit
();
/* NOTE: If the server is killed after the log that was produced
...
...
@@ -367,8 +374,11 @@ static void trx_purge_free_segment(buf_block_t *block, mtr_t &mtr)
This does not matter when using multiple innodb_undo_tablespaces;
innodb_undo_log_truncate=ON will be able to reclaim the space. */
mtr
.
start
();
rseg_hdr
->
page
.
lock
.
x_lock
();
ut_ad
(
rseg_hdr
->
page
.
id
()
==
rseg_hdr_id
);
block
->
page
.
lock
.
x_lock
();
ut_ad
(
block
->
page
.
id
()
==
id
);
mtr
.
memo_push
(
rseg_hdr
,
MTR_MEMO_PAGE_X_MODIFY
);
mtr
.
memo_push
(
block
,
MTR_MEMO_PAGE_X_MODIFY
);
}
...
...
@@ -458,7 +468,7 @@ trx_purge_truncate_rseg_history(trx_rseg_t &rseg,
free_segment:
ut_ad
(
rseg
.
curr_size
>=
seg_size
);
rseg
.
curr_size
-=
seg_size
;
trx_purge_free_segment
(
b
,
mtr
);
trx_purge_free_segment
(
rseg_hdr
,
b
,
mtr
);
break
;
case
TRX_UNDO_CACHED
:
/* rseg.undo_cached must point to this page */
...
...
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