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
b36154a1
Commit
b36154a1
authored
Dec 27, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup log_rec_t
parent
8cc15c03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
storage/innobase/include/log0recv.h
storage/innobase/include/log0recv.h
+1
-1
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+12
-9
No files found.
storage/innobase/include/log0recv.h
View file @
b36154a1
...
...
@@ -139,7 +139,7 @@ extern void (*log_file_op)(ulint space_id, const byte* flags,
/** Stored redo log record */
struct
log_rec_t
{
log_rec_t
(
lsn_t
lsn
)
:
next
(
NULL
),
lsn
(
lsn
)
{
}
log_rec_t
(
lsn_t
lsn
)
:
next
(
nullptr
),
lsn
(
lsn
)
{
ut_ad
(
lsn
);
}
log_rec_t
()
=
delete
;
log_rec_t
(
const
log_rec_t
&
)
=
delete
;
log_rec_t
&
operator
=
(
const
log_rec_t
&
)
=
delete
;
...
...
storage/innobase/log/log0recv.cc
View file @
b36154a1
...
...
@@ -132,15 +132,15 @@ struct recv_t : public log_rec_t
@param end_lsn end LSN of the mini-transaction
*/
recv_t
(
uint32_t
len
,
mlog_id_t
type
,
lsn_t
start_lsn
,
lsn_t
end_lsn
)
:
log_rec_t
(
end_lsn
),
len
(
len
),
type
(
type
),
start_lsn
(
start_lsn
),
data
(
NULL
)
log_rec_t
(
end_lsn
),
start_lsn
(
start_lsn
),
len
(
len
),
type
(
type
),
data
(
NULL
)
{}
/** start LSN of the mini-transaction (not necessarily of this record) */
const
lsn_t
start_lsn
;
/** log record body length in bytes */
const
uint32_t
len
;
/** log record type */
const
mlog_id_t
type
;
/** start LSN of the mini-transaction (not necessarily of this record) */
const
lsn_t
start_lsn
;
/** log record */
struct
data_t
{
...
...
@@ -1640,6 +1640,9 @@ recv_parse_or_apply_log_rec_body(
this record yet. */
break
;
case
MLOG_WRITE_STRING
:
ut_ad
(
!
page_zip
||
fil_page_get_type
(
page_zip
->
data
)
<=
FIL_PAGE_TYPE_ZBLOB2
);
if
(
page_id
.
page_no
()
||
mach_read_from_2
(
ptr
+
2
)
!=
11
+
MY_AES_BLOCK_SIZE
)
{
/* Not writing crypt_info */
...
...
@@ -1881,14 +1884,15 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
const
ulint
chunk_limit
=
static_cast
<
ulint
>
(
RECV_DATA_BLOCK_SIZE
);
for
(
const
log_rec_t
*
l
:
p
->
second
.
log
)
{
ut_ad
(
l
->
lsn
);
ut_ad
(
end_lsn
<=
l
->
lsn
);
end_lsn
=
l
->
lsn
;
ut_ad
(
end_lsn
<=
log_sys
.
log
.
scanned_lsn
);
const
recv_t
*
recv
=
static_cast
<
const
recv_t
*>
(
l
);
ut_ad
(
recv
->
start_lsn
);
ut_ad
(
recv
->
lsn
);
ut_ad
(
recv_start_lsn
<
recv
->
start_lsn
);
ut_d
(
recv_start_lsn
=
recv
->
start_lsn
);
ut_ad
(
end_lsn
<=
recv
->
lsn
);
end_lsn
=
recv
->
lsn
;
ut_ad
(
end_lsn
<=
log_sys
.
log
.
scanned_lsn
);
if
(
recv
->
start_lsn
<
page_lsn
)
{
/* Ignore this record, because there are later changes
...
...
@@ -1940,6 +1944,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
recv_parse_or_apply_log_rec_body
(
recv
->
type
,
recs
,
recs
+
recv
->
len
,
block
->
page
.
id
,
true
,
block
,
&
mtr
);
ut_free
(
buf
);
end_lsn
=
recv
->
start_lsn
+
recv
->
len
;
mach_write_to_8
(
FIL_PAGE_LSN
+
page
,
end_lsn
);
...
...
@@ -1951,8 +1956,6 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
mach_write_to_8
(
FIL_PAGE_LSN
+
page_zip
->
data
,
end_lsn
);
}
ut_free
(
buf
);
}
}
...
...
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