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
ccb35502
Commit
ccb35502
authored
Dec 19, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace MLOG_UNDO_INIT with MLOG_2BYTES, MLOG_4BYTES
parent
3464b670
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
72 deletions
+11
-72
storage/innobase/include/mtr0types.h
storage/innobase/include/mtr0types.h
+0
-3
storage/innobase/include/trx0undo.h
storage/innobase/include/trx0undo.h
+0
-10
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+0
-7
storage/innobase/trx/trx0undo.cc
storage/innobase/trx/trx0undo.cc
+11
-52
No files found.
storage/innobase/include/mtr0types.h
View file @
ccb35502
...
...
@@ -106,9 +106,6 @@ enum mlog_id_t {
/** erase an undo log page end */
MLOG_UNDO_ERASE_END
=
21
,
/** initialize a page in an undo log */
MLOG_UNDO_INIT
=
22
,
/** create an undo log header */
MLOG_UNDO_HDR_CREATE
=
25
,
...
...
storage/innobase/include/trx0undo.h
View file @
ccb35502
...
...
@@ -315,16 +315,6 @@ bool
trx_undo_truncate_tablespace
(
undo
::
Truncate
*
undo_trunc
);
/***********************************************************//**
Parses the redo log entry of an undo log page initialization.
@return end of log record or NULL */
byte
*
trx_undo_parse_page_init
(
/*=====================*/
const
byte
*
ptr
,
/*!< in: buffer */
const
byte
*
end_ptr
,
/*!< in: buffer end */
page_t
*
page
,
/*!< in: page or NULL */
mtr_t
*
mtr
);
/*!< in: mtr or NULL */
/** Parse the redo log entry of an undo log page header create.
@param[in] ptr redo log record
@param[in] end_ptr end of log buffer
...
...
storage/innobase/log/log0recv.cc
View file @
ccb35502
...
...
@@ -1402,10 +1402,6 @@ recv_parse_or_apply_log_rec_body(
ut_ad
(
!
page
||
page_type
==
FIL_PAGE_UNDO_LOG
);
ptr
=
trx_undo_parse_erase_page_end
(
ptr
,
end_ptr
,
page
,
mtr
);
break
;
case
MLOG_UNDO_INIT
:
/* Allow anything in page_type when creating a page. */
ptr
=
trx_undo_parse_page_init
(
ptr
,
end_ptr
,
page
,
mtr
);
break
;
case
MLOG_UNDO_HDR_CREATE
:
ut_ad
(
!
page
||
page_type
==
FIL_PAGE_UNDO_LOG
);
ptr
=
trx_undo_parse_page_header
(
ptr
,
end_ptr
,
page
,
mtr
);
...
...
@@ -3636,9 +3632,6 @@ get_mlog_string(mlog_id_t type)
case
MLOG_UNDO_ERASE_END
:
return
(
"MLOG_UNDO_ERASE_END"
);
case
MLOG_UNDO_INIT
:
return
(
"MLOG_UNDO_INIT"
);
case
MLOG_UNDO_HDR_CREATE
:
return
(
"MLOG_UNDO_HDR_CREATE"
);
...
...
storage/innobase/trx/trx0undo.cc
View file @
ccb35502
...
...
@@ -309,47 +309,6 @@ trx_undo_get_first_rec(
/*============== UNDO LOG FILE COPY CREATION AND FREEING ==================*/
/**********************************************************************//**
Writes the mtr log entry of an undo log page initialization. */
UNIV_INLINE
void
trx_undo_page_init_log
(
/*===================*/
page_t
*
undo_page
,
/*!< in: undo log page */
mtr_t
*
mtr
)
/*!< in: mtr */
{
mlog_write_initial_log_record
(
undo_page
,
MLOG_UNDO_INIT
,
mtr
);
mlog_catenate_ulint_compressed
(
mtr
,
0
);
}
/***********************************************************//**
Parses the redo log entry of an undo log page initialization.
@return end of log record or NULL */
byte
*
trx_undo_parse_page_init
(
/*=====================*/
const
byte
*
ptr
,
/*!< in: buffer */
const
byte
*
end_ptr
,
/*!< in: buffer end */
page_t
*
page
,
/*!< in: page or NULL */
mtr_t
*
mtr
)
/*!< in: mtr or NULL */
{
if
(
mach_parse_compressed
(
&
ptr
,
end_ptr
))
{
recv_sys
->
found_corrupt_log
=
true
;
}
if
(
ptr
==
NULL
)
{
return
(
NULL
);
}
if
(
page
)
{
trx_undo_page_init
(
page
,
mtr
);
}
return
(
const_cast
<
byte
*>
(
ptr
));
}
/********************************************************************//**
Initializes the fields in an undo log segment page. */
static
...
...
@@ -361,18 +320,18 @@ trx_undo_page_init(
{
trx_upagef_t
*
page_hdr
;
page_hdr
=
undo_page
+
TRX_UNDO_PAGE_HDR
;
mlog_write_ulint
(
undo_page
+
FIL_PAGE_TYPE
,
FIL_PAGE_UNDO_LOG
,
MLOG_2BYTES
,
mtr
);
compile_time_assert
(
TRX_UNDO_PAGE_TYPE
==
0
);
compile_time_assert
(
TRX_UNDO_PAGE_START
==
2
);
compile_time_assert
(
TRX_UNDO_PAGE_NODE
==
TRX_UNDO_PAGE_FREE
+
2
);
*
reinterpret_cast
<
uint16
*>
(
page_hdr
+
TRX_UNDO_PAGE_TYPE
)
=
0
;
mach_write_to_2
(
page_hdr
+
TRX_UNDO_PAGE_START
,
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_HDR_SIZE
);
mach_write_to_2
(
page_hdr
+
TRX_UNDO_PAGE_FREE
,
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_HDR_SIZE
);
fil_page_set_type
(
undo_page
,
FIL_PAGE_UNDO_LOG
);
trx_undo_page_init_log
(
undo_page
,
mtr
);
page_hdr
=
undo_page
+
TRX_UNDO_PAGE_HDR
;
mlog_write_ulint
(
page_hdr
,
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_HDR_SIZE
,
MLOG_4BYTES
,
mtr
);
mlog_write_ulint
(
page_hdr
+
TRX_UNDO_PAGE_FREE
,
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_HDR_SIZE
,
MLOG_2BYTES
,
mtr
);
}
/***************************************************************//**
...
...
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