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
9ee8917d
Commit
9ee8917d
authored
Dec 19, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace MLOG_UNDO_INSERT with MLOG_WRITE_STRING, MLOG_2BYTES
parent
ccb35502
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
91 deletions
+9
-91
storage/innobase/include/mtr0types.h
storage/innobase/include/mtr0types.h
+0
-3
storage/innobase/include/trx0rec.h
storage/innobase/include/trx0rec.h
+0
-9
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+0
-7
storage/innobase/trx/trx0rec.cc
storage/innobase/trx/trx0rec.cc
+9
-72
No files found.
storage/innobase/include/mtr0types.h
View file @
9ee8917d
...
...
@@ -100,9 +100,6 @@ enum mlog_id_t {
/** Create an index page */
MLOG_PAGE_CREATE
=
19
,
/** Insert entry in an undo log */
MLOG_UNDO_INSERT
=
20
,
/** erase an undo log page end */
MLOG_UNDO_ERASE_END
=
21
,
...
...
storage/innobase/include/trx0rec.h
View file @
9ee8917d
...
...
@@ -237,15 +237,6 @@ trx_undo_prev_version_build(
And if we read "after image" of undo log */
/***********************************************************//**
Parses a redo log record of adding an undo log record.
@return end of log record or NULL */
byte
*
trx_undo_parse_add_undo_rec
(
/*========================*/
byte
*
ptr
,
/*!< in: buffer */
byte
*
end_ptr
,
/*!< in: buffer end */
page_t
*
page
);
/*!< in: page or NULL */
/***********************************************************//**
Parses a redo log record of erasing of an undo page end.
@return end of log record or NULL */
byte
*
...
...
storage/innobase/log/log0recv.cc
View file @
9ee8917d
...
...
@@ -1394,10 +1394,6 @@ recv_parse_or_apply_log_rec_body(
page_parse_create
(
block
,
type
==
MLOG_COMP_PAGE_CREATE_RTREE
,
true
);
break
;
case
MLOG_UNDO_INSERT
:
ut_ad
(
!
page
||
page_type
==
FIL_PAGE_UNDO_LOG
);
ptr
=
trx_undo_parse_add_undo_rec
(
ptr
,
end_ptr
,
page
);
break
;
case
MLOG_UNDO_ERASE_END
:
ut_ad
(
!
page
||
page_type
==
FIL_PAGE_UNDO_LOG
);
ptr
=
trx_undo_parse_erase_page_end
(
ptr
,
end_ptr
,
page
,
mtr
);
...
...
@@ -3626,9 +3622,6 @@ get_mlog_string(mlog_id_t type)
case
MLOG_PAGE_CREATE
:
return
(
"MLOG_PAGE_CREATE"
);
case
MLOG_UNDO_INSERT
:
return
(
"MLOG_UNDO_INSERT"
);
case
MLOG_UNDO_ERASE_END
:
return
(
"MLOG_UNDO_ERASE_END"
);
...
...
storage/innobase/trx/trx0rec.cc
View file @
9ee8917d
...
...
@@ -65,78 +65,15 @@ trx_undof_page_add_undo_rec_log(
ulint
new_free
,
/*!< in: end offset of the entry */
mtr_t
*
mtr
)
/*!< in: mtr */
{
byte
*
log_ptr
;
const
byte
*
log_end
;
ulint
len
;
log_ptr
=
mlog_open
(
mtr
,
11
+
13
+
MLOG_BUF_MARGIN
);
if
(
log_ptr
==
NULL
)
{
return
;
}
log_end
=
&
log_ptr
[
11
+
13
+
MLOG_BUF_MARGIN
];
log_ptr
=
mlog_write_initial_log_record_fast
(
undo_page
,
MLOG_UNDO_INSERT
,
log_ptr
,
mtr
);
len
=
new_free
-
old_free
-
4
;
mach_write_to_2
(
log_ptr
,
len
);
log_ptr
+=
2
;
if
(
log_ptr
+
len
<=
log_end
)
{
memcpy
(
log_ptr
,
undo_page
+
old_free
+
2
,
len
);
mlog_close
(
mtr
,
log_ptr
+
len
);
}
else
{
mlog_close
(
mtr
,
log_ptr
);
mlog_catenate_string
(
mtr
,
undo_page
+
old_free
+
2
,
len
);
}
}
/***********************************************************//**
Parses a redo log record of adding an undo log record.
@return end of log record or NULL */
byte
*
trx_undo_parse_add_undo_rec
(
/*========================*/
byte
*
ptr
,
/*!< in: buffer */
byte
*
end_ptr
,
/*!< in: buffer end */
page_t
*
page
)
/*!< in: page or NULL */
{
ulint
len
;
byte
*
rec
;
ulint
first_free
;
if
(
end_ptr
<
ptr
+
2
)
{
return
(
NULL
);
}
len
=
mach_read_from_2
(
ptr
);
ptr
+=
2
;
if
(
end_ptr
<
ptr
+
len
)
{
return
(
NULL
);
}
if
(
page
==
NULL
)
{
return
(
ptr
+
len
);
}
first_free
=
mach_read_from_2
(
page
+
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_FREE
);
rec
=
page
+
first_free
;
mach_write_to_2
(
rec
,
first_free
+
4
+
len
);
mach_write_to_2
(
rec
+
2
+
len
,
first_free
);
mach_write_to_2
(
page
+
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_FREE
,
first_free
+
4
+
len
);
ut_memcpy
(
rec
+
2
,
ptr
,
len
);
return
(
ptr
+
len
);
ut_ad
(
old_free
>=
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_HDR_SIZE
);
ut_ad
(
new_free
>=
old_free
);
ut_ad
(
new_free
<
UNIV_PAGE_SIZE
);
ut_ad
(
mach_read_from_2
(
undo_page
+
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_FREE
)
==
new_free
);
mlog_write_ulint
(
undo_page
+
TRX_UNDO_PAGE_HDR
+
TRX_UNDO_PAGE_FREE
,
new_free
,
MLOG_2BYTES
,
mtr
);
mlog_log_string
(
undo_page
+
old_free
,
new_free
-
old_free
,
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