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
94e22efb
Commit
94e22efb
authored
Jan 03, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
8cbb0bfa
b7392d14
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
extra/mariabackup/fil_cur.cc
extra/mariabackup/fil_cur.cc
+15
-7
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+12
-2
extra/mariabackup/xtrabackup.h
extra/mariabackup/xtrabackup.h
+1
-0
No files found.
extra/mariabackup/fil_cur.cc
View file @
94e22efb
...
@@ -261,6 +261,8 @@ xb_fil_cur_open(
...
@@ -261,6 +261,8 @@ xb_fil_cur_open(
mutex_exit
(
&
fil_system
.
mutex
);
mutex_exit
(
&
fil_system
.
mutex
);
}
}
/*msg("crypt: %s,%u\n", node->name, node->space->crypt_data->type);*/
cursor
->
space_size
=
(
ulint
)(
cursor
->
statinfo
.
st_size
cursor
->
space_size
=
(
ulint
)(
cursor
->
statinfo
.
st_size
/
page_size
.
physical
());
/
page_size
.
physical
());
...
@@ -271,8 +273,9 @@ xb_fil_cur_open(
...
@@ -271,8 +273,9 @@ xb_fil_cur_open(
return
(
XB_FIL_CUR_SUCCESS
);
return
(
XB_FIL_CUR_SUCCESS
);
}
}
static
bool
page_is_corrupted
(
byte
*
page
,
ulint
page_no
,
xb_fil_cur_t
*
cursor
,
static
bool
page_is_corrupted
(
const
byte
*
page
,
ulint
page_no
,
fil_space_t
*
space
)
const
xb_fil_cur_t
*
cursor
,
const
fil_space_t
*
space
)
{
{
byte
tmp_frame
[
UNIV_PAGE_SIZE_MAX
];
byte
tmp_frame
[
UNIV_PAGE_SIZE_MAX
];
byte
tmp_page
[
UNIV_PAGE_SIZE_MAX
];
byte
tmp_page
[
UNIV_PAGE_SIZE_MAX
];
...
@@ -300,8 +303,8 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
...
@@ -300,8 +303,8 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
from the start of each file.)
from the start of each file.)
The first 38 and last 8 bytes are never encrypted. */
The first 38 and last 8 bytes are never encrypted. */
const
ulint
*
p
=
reinterpret_cast
<
ulint
*>
(
page
);
const
ulint
*
p
=
reinterpret_cast
<
const
ulint
*>
(
page
);
const
ulint
*
const
end
=
reinterpret_cast
<
ulint
*>
(
const
ulint
*
const
end
=
reinterpret_cast
<
const
ulint
*>
(
page
+
page_size
);
page
+
page_size
);
do
{
do
{
if
(
*
p
++
)
{
if
(
*
p
++
)
{
...
@@ -321,8 +324,9 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
...
@@ -321,8 +324,9 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
page_no first. */
page_no first. */
if
(
page_no
if
(
page_no
&&
mach_read_from_4
(
page
+
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
)
&&
mach_read_from_4
(
page
+
FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
)
&&
space
->
crypt_data
&&
(
opt_backup_encrypted
&&
space
->
crypt_data
->
type
!=
CRYPT_SCHEME_UNENCRYPTED
)
{
||
(
space
->
crypt_data
&&
space
->
crypt_data
->
type
!=
CRYPT_SCHEME_UNENCRYPTED
)))
{
if
(
!
fil_space_verify_crypt_checksum
(
page
,
cursor
->
page_size
))
if
(
!
fil_space_verify_crypt_checksum
(
page
,
cursor
->
page_size
))
return
true
;
return
true
;
...
@@ -336,7 +340,10 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
...
@@ -336,7 +340,10 @@ static bool page_is_corrupted(byte *page, ulint page_no, xb_fil_cur_t *cursor,
memcpy
(
tmp_page
,
page
,
page_size
);
memcpy
(
tmp_page
,
page
,
page_size
);
bool
decrypted
=
false
;
bool
decrypted
=
false
;
if
(
!
fil_space_decrypt
(
space
,
tmp_frame
,
tmp_page
,
&
decrypted
))
{
if
(
!
space
->
crypt_data
||
space
->
crypt_data
->
type
==
CRYPT_SCHEME_UNENCRYPTED
||
fil_space_decrypt
(
space
,
tmp_frame
,
tmp_page
,
&
decrypted
))
{
return
true
;
return
true
;
}
}
...
@@ -462,6 +469,7 @@ xb_fil_cur_read(
...
@@ -462,6 +469,7 @@ xb_fil_cur_read(
"corrupted.
\n
"
,
cursor
->
thread_n
,
"corrupted.
\n
"
,
cursor
->
thread_n
,
cursor
->
abs_path
);
cursor
->
abs_path
);
ret
=
XB_FIL_CUR_ERROR
;
ret
=
XB_FIL_CUR_ERROR
;
buf_page_print
(
page
,
cursor
->
page_size
);
break
;
break
;
}
}
msg
(
"[%02u] mariabackup: "
msg
(
"[%02u] mariabackup: "
...
...
extra/mariabackup/xtrabackup.cc
View file @
94e22efb
...
@@ -201,6 +201,7 @@ static char* log_ignored_opt;
...
@@ -201,6 +201,7 @@ static char* log_ignored_opt;
extern
my_bool
opt_use_ssl
;
extern
my_bool
opt_use_ssl
;
my_bool
opt_ssl_verify_server_cert
;
my_bool
opt_ssl_verify_server_cert
;
my_bool
opt_extended_validation
;
my_bool
opt_extended_validation
;
my_bool
opt_backup_encrypted
;
/* === metadata of backup === */
/* === metadata of backup === */
#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
#define XTRABACKUP_METADATA_FILENAME "xtrabackup_checkpoints"
...
@@ -762,6 +763,7 @@ enum options_xtrabackup
...
@@ -762,6 +763,7 @@ enum options_xtrabackup
OPT_XTRA_DATABASES_FILE
,
OPT_XTRA_DATABASES_FILE
,
OPT_XTRA_PARALLEL
,
OPT_XTRA_PARALLEL
,
OPT_XTRA_EXTENDED_VALIDATION
,
OPT_XTRA_EXTENDED_VALIDATION
,
OPT_XTRA_BACKUP_ENCRYPTED
,
OPT_XTRA_STREAM
,
OPT_XTRA_STREAM
,
OPT_XTRA_COMPRESS
,
OPT_XTRA_COMPRESS
,
OPT_XTRA_COMPRESS_THREADS
,
OPT_XTRA_COMPRESS_THREADS
,
...
@@ -1220,12 +1222,20 @@ struct my_option xb_server_options[] =
...
@@ -1220,12 +1222,20 @@ struct my_option xb_server_options[] =
REQUIRED_ARG
,
1
,
1
,
INT_MAX
,
0
,
0
,
0
},
REQUIRED_ARG
,
1
,
1
,
INT_MAX
,
0
,
0
,
0
},
{
"extended_validation"
,
OPT_XTRA_EXTENDED_VALIDATION
,
{
"extended_validation"
,
OPT_XTRA_EXTENDED_VALIDATION
,
"Enable extended validation for Innodb data pages during backup phase."
"Enable extended validation for Innodb data pages during backup phase. "
"Will slow down backup considerably, in case encryption is used."
,
"Will slow down backup considerably, in case encryption is used. "
"May fail if tables are created during the backup."
,
(
G_PTR
*
)
&
opt_extended_validation
,
(
G_PTR
*
)
&
opt_extended_validation
,
(
G_PTR
*
)
&
opt_extended_validation
,
(
G_PTR
*
)
&
opt_extended_validation
,
0
,
GET_BOOL
,
NO_ARG
,
FALSE
,
0
,
0
,
0
,
0
,
0
},
0
,
GET_BOOL
,
NO_ARG
,
FALSE
,
0
,
0
,
0
,
0
,
0
},
{
"backup_encrypted"
,
OPT_XTRA_BACKUP_ENCRYPTED
,
"In --backup, assume that nonzero key_version implies that the page"
" is encrypted. Use --backup --skip-backup-encrypted to allow"
" copying unencrypted that were originally created before MySQL 5.1.48."
,
(
G_PTR
*
)
&
opt_backup_encrypted
,
(
G_PTR
*
)
&
opt_backup_encrypted
,
0
,
GET_BOOL
,
NO_ARG
,
TRUE
,
0
,
0
,
0
,
0
,
0
},
{
"log"
,
OPT_LOG
,
"Ignored option for MySQL option compatibility"
,
{
"log"
,
OPT_LOG
,
"Ignored option for MySQL option compatibility"
,
(
G_PTR
*
)
&
log_ignored_opt
,
(
G_PTR
*
)
&
log_ignored_opt
,
0
,
(
G_PTR
*
)
&
log_ignored_opt
,
(
G_PTR
*
)
&
log_ignored_opt
,
0
,
...
...
extra/mariabackup/xtrabackup.h
View file @
94e22efb
...
@@ -112,6 +112,7 @@ extern my_bool opt_no_backup_locks;
...
@@ -112,6 +112,7 @@ extern my_bool opt_no_backup_locks;
extern
my_bool
opt_decompress
;
extern
my_bool
opt_decompress
;
extern
my_bool
opt_remove_original
;
extern
my_bool
opt_remove_original
;
extern
my_bool
opt_extended_validation
;
extern
my_bool
opt_extended_validation
;
extern
my_bool
opt_backup_encrypted
;
extern
my_bool
opt_lock_ddl_per_table
;
extern
my_bool
opt_lock_ddl_per_table
;
extern
char
*
opt_incremental_history_name
;
extern
char
*
opt_incremental_history_name
;
...
...
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