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
8341f582
Commit
8341f582
authored
Mar 31, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15527 fixup for innodb_checksum_algorithm=full_crc32
parent
50de71b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
17 deletions
+38
-17
mysql-test/suite/encryption/t/innodb-discard-import-change.combinations
...te/encryption/t/innodb-discard-import-change.combinations
+5
-0
mysql-test/suite/encryption/t/innodb-discard-import.combinations
...est/suite/encryption/t/innodb-discard-import.combinations
+5
-0
storage/innobase/row/row0import.cc
storage/innobase/row/row0import.cc
+28
-17
No files found.
mysql-test/suite/encryption/t/innodb-discard-import-change.combinations
0 → 100644
View file @
8341f582
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
mysql-test/suite/encryption/t/innodb-discard-import.combinations
0 → 100644
View file @
8341f582
[strict_crc32]
--innodb-checksum-algorithm=strict_crc32
[strict_full_crc32]
--innodb-checksum-algorithm=strict_full_crc32
storage/innobase/row/row0import.cc
View file @
8341f582
...
...
@@ -3356,6 +3356,7 @@ struct fil_iterator_t {
tablespace involved. It does help to save the disk space when
punch hole is enabled
@param iter Tablespace iterator
@param full_crc32 whether the file is in the full_crc32 format
@param write_request Request to write into the file
@param offset offset of the file to be written
@param writeptr buffer to be written
...
...
@@ -3365,16 +3366,19 @@ punch hole is enabled
@return DB_SUCCESS */
static
dberr_t
fil_import_compress_fwrite
(
const
fil_iterator_t
&
iter
,
bool
full_crc32
,
const
IORequest
&
write_request
,
os_offset_t
offset
,
const
byte
*
writeptr
,
ulint
n_bytes
,
bool
try_punch_only
=
false
)
{
dberr_t
err
=
os_file_punch_hole
(
iter
.
file
,
offset
,
n_bytes
);
if
(
err
!=
DB_SUCCESS
||
try_punch_only
)
if
(
dberr_t
err
=
os_file_punch_hole
(
iter
.
file
,
offset
,
n_bytes
))
return
err
;
if
(
try_punch_only
)
return
DB_SUCCESS
;
for
(
ulint
j
=
0
;
j
<
n_bytes
;
j
+=
srv_page_size
)
{
/* Read the original data length from block and
...
...
@@ -3388,16 +3392,23 @@ dberr_t fil_import_compress_fwrite(const fil_iterator_t &iter,
/* Ignore the empty page */
if
(
ptype
==
0
&&
n_write_bytes
==
0
)
continue
;
n_write_bytes
+=
FIL_PAGE_DATA
+
FIL_PAGE_ENCRYPT_COMP_METADATA_LEN
;
if
(
full_crc32
)
n_write_bytes
=
buf_page_full_crc32_size
(
writeptr
+
j
,
nullptr
,
nullptr
);
else
{
n_write_bytes
+=
ptype
==
FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED
?
FIL_PAGE_DATA
+
FIL_PAGE_ENCRYPT_COMP_METADATA_LEN
:
FIL_PAGE_DATA
+
FIL_PAGE_COMP_METADATA_LEN
;
}
err
=
os_file_write
(
write_request
,
iter
.
filepath
,
iter
.
file
,
writeptr
+
j
,
offset
+
j
,
n_write_bytes
);
if
(
err
!=
DB_SUCCESS
)
break
;
}
if
(
dberr_t
err
=
os_file_write
(
write_request
,
iter
.
filepath
,
iter
.
file
,
writeptr
+
j
,
offset
+
j
,
n_write_bytes
))
return
err
;
}
return
DB_SUCCESS
;
}
/********************************************************************//**
...
...
@@ -3721,8 +3732,8 @@ fil_iterate(
if
(
page_compressed
&&
punch_hole
)
{
err
=
fil_import_compress_fwrite
(
iter
,
write_request
,
offset
,
writeptr
,
n_bytes
,
!
updated
);
iter
,
full_crc32
,
write_request
,
offset
,
writeptr
,
n_bytes
,
!
updated
);
if
(
err
!=
DB_SUCCESS
)
{
punch_hole
=
false
;
...
...
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