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
06079a4c
Commit
06079a4c
authored
Aug 19, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
a2a0ac7c
89723ce1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
13 deletions
+28
-13
mysql-test/suite/encryption/t/innodb_import.test
mysql-test/suite/encryption/t/innodb_import.test
+2
-1
mysql-test/suite/innodb/t/full_crc32_import.opt
mysql-test/suite/innodb/t/full_crc32_import.opt
+0
-1
mysql-test/suite/innodb/t/full_crc32_import.test
mysql-test/suite/innodb/t/full_crc32_import.test
+1
-0
storage/innobase/row/row0import.cc
storage/innobase/row/row0import.cc
+25
-11
No files found.
mysql-test/suite/encryption/t/innodb_import.test
View file @
06079a4c
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_example_key_management_plugin
.
inc
--
source
include
/
have_example_key_management_plugin
.
inc
--
source
include
/
innodb_checksum_algorithm
.
inc
--
echo
#
--
echo
# MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespace
--
echo
#
...
...
mysql-test/suite/innodb/t/full_crc32_import.opt
deleted
100644 → 0
View file @
a2a0ac7c
--innodb_checksum_algorithm=full_crc32
mysql-test/suite/innodb/t/full_crc32_import.test
View file @
06079a4c
...
...
@@ -138,6 +138,7 @@ EOF
ALTER
TABLE
t1
IMPORT
TABLESPACE
;
--
enable_warnings
ALTER
TABLE
t1
DROP
INDEX
idx1
;
--
replace_regex
/
opening
'.*\/test\//opening '
.
\
/
test
\
//
ALTER
TABLE
t1
IMPORT
TABLESPACE
;
--
disable_warnings
SHOW
CREATE
TABLE
t1
;
...
...
storage/innobase/row/row0import.cc
View file @
06079a4c
...
...
@@ -695,7 +695,7 @@ struct FetchIndexRootPages : public AbstractCallback {
@param block Block to use for IO
@retval DB_SUCCESS or error code */
dberr_t
run
(
const
fil_iterator_t
&
iter
,
buf_block_t
*
block
)
UNIV_NOTHROW
;
buf_block_t
*
block
)
UNIV_NOTHROW
override
;
/** Called for each block as it is read from the file.
@param block block to convert, it is not from the buffer pool.
...
...
@@ -866,7 +866,8 @@ class PageConverter : public AbstractCallback {
}
}
dberr_t
run
(
const
fil_iterator_t
&
iter
,
buf_block_t
*
block
)
UNIV_NOTHROW
dberr_t
run
(
const
fil_iterator_t
&
iter
,
buf_block_t
*
block
)
UNIV_NOTHROW
override
{
return
fil_iterate
(
iter
,
block
,
*
this
);
}
...
...
@@ -3435,6 +3436,8 @@ dberr_t FetchIndexRootPages::run(const fil_iterator_t& iter,
#endif
srv_page_size
;
byte
*
page_compress_buf
=
static_cast
<
byte
*>
(
malloc
(
buf_size
));
const
bool
full_crc32
=
fil_space_t
::
full_crc32
(
m_space_flags
);
bool
skip_checksum_check
=
false
;
ut_ad
(
!
srv_read_only_mode
);
if
(
!
page_compress_buf
)
...
...
@@ -3468,17 +3471,22 @@ dberr_t FetchIndexRootPages::run(const fil_iterator_t& iter,
}
block
->
page
.
id_
.
set_page_no
(
3
);
switch
(
fil_page_get_type
(
readptr
))
{
case
FIL_PAGE_PAGE_COMPRESSED
:
case
FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED
:
if
(
block
->
page
.
zip
.
data
)
goto
page_corrupted
;
page_compressed
=
true
;
if
(
full_crc32
&&
fil_space_t
::
is_compressed
(
m_space_flags
))
page_compressed
=
buf_page_is_compressed
(
readptr
,
m_space_flags
);
else
{
switch
(
fil_page_get_type
(
readptr
))
{
case
FIL_PAGE_PAGE_COMPRESSED
:
case
FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED
:
if
(
block
->
page
.
zip
.
data
)
goto
page_corrupted
;
page_compressed
=
true
;
}
}
if
(
encrypted
)
{
if
(
!
fil_space_verify_crypt_checksum
(
readptr
,
zip_size
))
if
(
!
buf_page_verify_crypt_checksum
(
readptr
,
m_space_flags
))
goto
page_corrupted
;
if
(
!
fil_space_decrypt
(
get_space_id
(),
iter
.
crypt_data
,
readptr
,
...
...
@@ -3487,15 +3495,21 @@ dberr_t FetchIndexRootPages::run(const fil_iterator_t& iter,
goto
func_exit
;
}
/* For full_crc32 format, skip checksum check
after decryption. */
skip_checksum_check
=
full_crc32
&&
encrypted
;
if
(
page_compressed
)
{
ulint
compress_length
=
fil_page_decompress
(
page_compress_buf
,
readptr
,
ulint
compress_length
=
fil_page_decompress
(
page_compress_buf
,
readptr
,
m_space_flags
);
ut_ad
(
compress_length
!=
srv_page_size
);
if
(
compress_length
==
0
)
goto
page_corrupted
;
}
else
if
(
buf_page_is_corrupted
(
false
,
readptr
,
m_space_flags
))
else
if
(
!
skip_checksum_check
&&
buf_page_is_corrupted
(
false
,
readptr
,
m_space_flags
))
goto
page_corrupted
;
err
=
this
->
operator
()(
block
);
...
...
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