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
fbd11d5f
Commit
fbd11d5f
authored
1 year ago
by
Daniel Black
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18200 MariaBackup full backup failed with InnoDB: Failing assertion: success
Review cleanups.
parent
c79ca7c7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
20 deletions
+11
-20
storage/innobase/include/log0log.h
storage/innobase/include/log0log.h
+6
-3
storage/innobase/log/log0log.cc
storage/innobase/log/log0log.cc
+0
-11
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+5
-6
No files found.
storage/innobase/include/log0log.h
View file @
fbd11d5f
...
@@ -503,13 +503,16 @@ struct log_t{
...
@@ -503,13 +503,16 @@ struct log_t{
void
write_header_durable
(
lsn_t
lsn
);
void
write_header_durable
(
lsn_t
lsn
);
/** opens log file which must be closed prior this call */
/** opens log file which must be closed prior this call */
dberr_t
rename
(
std
::
string
path
)
{
return
fd
.
rename
(
path
);
}
dberr_t
rename
(
std
::
string
path
)
{
return
fd
.
rename
(
path
);
}
MY_ATTRIBUTE
((
warn_unused_result
))
/** reads buffer from log file
/** reads buffer from log file
@param[in] offset offset in log file
@param[in] offset offset in log file
@param[in] buf buffer where to read */
@param[in] buf buffer where to read */
dberr_t
MY_ATTRIBUTE
((
warn_unused_result
))
read
(
os_offset_t
offset
,
dberr_t
read
(
os_offset_t
offset
,
span
<
byte
>
buf
)
span
<
byte
>
buf
);
{
return
fd
.
read
(
offset
,
buf
);
}
/** Tells whether writes require calling flush() */
/** Tells whether writes require calling flush() */
bool
writes_are_durable
()
const
noexcept
;
bool
writes_are_durable
()
const
noexcept
{
return
fd
.
writes_are_durable
();
}
/** writes buffer to log file
/** writes buffer to log file
@param[in] offset offset in log file
@param[in] offset offset in log file
@param[in] buf buffer from which to write */
@param[in] buf buffer from which to write */
...
...
This diff is collapsed.
Click to expand it.
storage/innobase/log/log0log.cc
View file @
fbd11d5f
...
@@ -514,17 +514,6 @@ void log_t::file::write_header_durable(lsn_t lsn)
...
@@ -514,17 +514,6 @@ void log_t::file::write_header_durable(lsn_t lsn)
log_sys
.
log
.
flush
();
log_sys
.
log
.
flush
();
}
}
__attribute__
((
warn_unused_result
))
dberr_t
log_t
::
file
::
read
(
os_offset_t
offset
,
span
<
byte
>
buf
)
{
return
fd
.
read
(
offset
,
buf
);
}
bool
log_t
::
file
::
writes_are_durable
()
const
noexcept
{
return
fd
.
writes_are_durable
();
}
void
log_t
::
file
::
write
(
os_offset_t
offset
,
span
<
byte
>
buf
)
void
log_t
::
file
::
write
(
os_offset_t
offset
,
span
<
byte
>
buf
)
{
{
srv_stats
.
os_log_pending_writes
.
inc
();
srv_stats
.
os_log_pending_writes
.
inc
();
...
...
This diff is collapsed.
Click to expand it.
storage/innobase/log/log0recv.cc
View file @
fbd11d5f
...
@@ -763,8 +763,7 @@ void recv_sys_t::open_log_files_if_needed()
...
@@ -763,8 +763,7 @@ void recv_sys_t::open_log_files_if_needed()
}
}
MY_ATTRIBUTE
((
warn_unused_result
))
MY_ATTRIBUTE
((
warn_unused_result
))
dberr_t
dberr_t
recv_sys_t
::
read
(
os_offset_t
total_offset
,
span
<
byte
>
buf
)
recv_sys_t
::
read
(
os_offset_t
total_offset
,
span
<
byte
>
buf
)
{
{
open_log_files_if_needed
();
open_log_files_if_needed
();
...
@@ -1274,7 +1273,6 @@ inline uint32_t log_block_calc_checksum_format_0(const byte *b)
...
@@ -1274,7 +1273,6 @@ inline uint32_t log_block_calc_checksum_format_0(const byte *b)
ATTRIBUTE_COLD
static
dberr_t
recv_log_recover_pre_10_2
()
ATTRIBUTE_COLD
static
dberr_t
recv_log_recover_pre_10_2
()
{
{
uint64_t
max_no
=
0
;
uint64_t
max_no
=
0
;
dberr_t
err
;
byte
*
buf
=
log_sys
.
buf
;
byte
*
buf
=
log_sys
.
buf
;
ut_ad
(
log_sys
.
log
.
format
==
0
);
ut_ad
(
log_sys
.
log
.
format
==
0
);
...
@@ -1298,7 +1296,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
...
@@ -1298,7 +1296,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
for
(
ulint
field
=
LOG_CHECKPOINT_1
;
field
<=
LOG_CHECKPOINT_2
;
for
(
ulint
field
=
LOG_CHECKPOINT_1
;
field
<=
LOG_CHECKPOINT_2
;
field
+=
LOG_CHECKPOINT_2
-
LOG_CHECKPOINT_1
)
field
+=
LOG_CHECKPOINT_2
-
LOG_CHECKPOINT_1
)
{
{
if
(
(
err
=
log_sys
.
log
.
read
(
field
,
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
})
))
if
(
dberr_t
err
=
log_sys
.
log
.
read
(
field
,
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
}
))
return
err
;
return
err
;
if
(
static_cast
<
uint32_t
>
(
ut_fold_binary
(
buf
,
CHECKSUM_1
))
!=
if
(
static_cast
<
uint32_t
>
(
ut_fold_binary
(
buf
,
CHECKSUM_1
))
!=
...
@@ -1351,7 +1349,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
...
@@ -1351,7 +1349,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
"InnoDB: Upgrade after a crash is not supported."
"InnoDB: Upgrade after a crash is not supported."
" This redo log was created before MariaDB 10.2.2"
;
" This redo log was created before MariaDB 10.2.2"
;
if
(
(
err
=
recv_sys
.
read
(
source_offset
&
~
511
,
{
buf
,
512
})
))
if
(
dberr_t
err
=
recv_sys
.
read
(
source_offset
&
~
511
,
{
buf
,
512
}
))
return
err
;
return
err
;
if
(
log_block_calc_checksum_format_0
(
buf
)
!=
log_block_get_checksum
(
buf
)
&&
if
(
log_block_calc_checksum_format_0
(
buf
)
!=
log_block_get_checksum
(
buf
)
&&
...
@@ -1419,7 +1417,8 @@ static dberr_t recv_log_recover_10_4()
...
@@ -1419,7 +1417,8 @@ static dberr_t recv_log_recover_10_4()
return
DB_CORRUPTION
;
return
DB_CORRUPTION
;
}
}
if
(
dberr_t
err
=
recv_sys
.
read
(
source_offset
&
~
lsn_t
(
OS_FILE_LOG_BLOCK_SIZE
-
1
),
if
(
dberr_t
err
=
recv_sys
.
read
(
source_offset
&
~
lsn_t
(
OS_FILE_LOG_BLOCK_SIZE
-
1
),
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
}))
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
}))
return
err
;
return
err
;
...
...
This diff is collapsed.
Click to expand it.
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