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
c0db3fe6
Commit
c0db3fe6
authored
May 27, 2019
by
Simon Lipp
Committed by
Robert Bindar
Sep 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18438 Don't stream xtrabackup_info of extra-lsndir
parent
f94d9ab9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
10 deletions
+62
-10
extra/mariabackup/backup_copy.cc
extra/mariabackup/backup_copy.cc
+2
-1
extra/mariabackup/backup_mysql.cc
extra/mariabackup/backup_mysql.cc
+36
-7
extra/mariabackup/backup_mysql.h
extra/mariabackup/backup_mysql.h
+2
-1
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+1
-1
mysql-test/suite/mariabackup/extra_lsndir_stream.result
mysql-test/suite/mariabackup/extra_lsndir_stream.result
+2
-0
mysql-test/suite/mariabackup/extra_lsndir_stream.test
mysql-test/suite/mariabackup/extra_lsndir_stream.test
+7
-0
mysql-test/suite/mariabackup/mdev-18438.result
mysql-test/suite/mariabackup/mdev-18438.result
+1
-0
mysql-test/suite/mariabackup/mdev-18438.test
mysql-test/suite/mariabackup/mdev-18438.test
+11
-0
No files found.
extra/mariabackup/backup_copy.cc
View file @
c0db3fe6
...
@@ -1610,7 +1610,8 @@ bool backup_finish()
...
@@ -1610,7 +1610,8 @@ bool backup_finish()
return
(
false
);
return
(
false
);
}
}
if
(
!
write_xtrabackup_info
(
mysql_connection
,
XTRABACKUP_INFO
,
opt_history
!=
0
))
{
if
(
!
write_xtrabackup_info
(
mysql_connection
,
XTRABACKUP_INFO
,
opt_history
!=
0
,
true
))
{
return
(
false
);
return
(
false
);
}
}
...
...
extra/mariabackup/backup_mysql.cc
View file @
c0db3fe6
...
@@ -1472,9 +1472,12 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
...
@@ -1472,9 +1472,12 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
table containing all the history info particular to the just completed
table containing all the history info particular to the just completed
backup. */
backup. */
bool
bool
write_xtrabackup_info
(
MYSQL
*
connection
,
const
char
*
filename
,
bool
history
)
write_xtrabackup_info
(
MYSQL
*
connection
,
const
char
*
filename
,
bool
history
,
bool
stream
)
{
{
bool
result
=
true
;
FILE
*
fp
=
NULL
;
char
*
uuid
=
NULL
;
char
*
uuid
=
NULL
;
char
*
server_version
=
NULL
;
char
*
server_version
=
NULL
;
char
buf_start_time
[
100
];
char
buf_start_time
[
100
];
...
@@ -1500,7 +1503,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
...
@@ -1500,7 +1503,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
||
xtrabackup_databases_exclude
||
xtrabackup_databases_exclude
);
);
backup_file_printf
(
filename
,
char
*
buf
=
NULL
;
int
buf_len
=
asprintf
(
&
buf
,
"uuid = %s
\n
"
"uuid = %s
\n
"
"name = %s
\n
"
"name = %s
\n
"
"tool_name = %s
\n
"
"tool_name = %s
\n
"
...
@@ -1512,8 +1516,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
...
@@ -1512,8 +1516,8 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
"end_time = %s
\n
"
"end_time = %s
\n
"
"lock_time = %d
\n
"
"lock_time = %d
\n
"
"binlog_pos = %s
\n
"
"binlog_pos = %s
\n
"
"innodb_from_lsn =
%llu
\n
"
"innodb_from_lsn =
"
LSN_PF
"
\n
"
"innodb_to_lsn =
%llu
\n
"
"innodb_to_lsn =
"
LSN_PF
"
\n
"
"partial = %s
\n
"
"partial = %s
\n
"
"incremental = %s
\n
"
"incremental = %s
\n
"
"format = %s
\n
"
"format = %s
\n
"
...
@@ -1530,12 +1534,34 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
...
@@ -1530,12 +1534,34 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
(
int
)
history_lock_time
,
/* lock_time */
(
int
)
history_lock_time
,
/* lock_time */
mysql_binlog_position
?
mysql_binlog_position
?
mysql_binlog_position
:
""
,
/* binlog_pos */
mysql_binlog_position
:
""
,
/* binlog_pos */
incremental_lsn
,
/* innodb_from_lsn */
incremental_lsn
,
metadata_to_lsn
,
/* innodb_to_lsn */
/* innodb_from_lsn */
metadata_to_lsn
,
/* innodb_to_lsn */
is_partial
?
"Y"
:
"N"
,
is_partial
?
"Y"
:
"N"
,
xtrabackup_incremental
?
"Y"
:
"N"
,
/* incremental */
xtrabackup_incremental
?
"Y"
:
"N"
,
/* incremental */
xb_stream_name
[
xtrabackup_stream_fmt
],
/* format */
xb_stream_name
[
xtrabackup_stream_fmt
],
/* format */
xtrabackup_compress
?
"compressed"
:
"N"
);
/* compressed */
xtrabackup_compress
?
"compressed"
:
"N"
);
/* compressed */
if
(
buf_len
<
0
)
{
msg
(
"Error: cannot generate xtrabackup_info"
);
result
=
false
;
goto
cleanup
;
}
if
(
stream
)
{
backup_file_printf
(
filename
,
"%s"
,
buf
);
}
else
{
fp
=
fopen
(
filename
,
"w"
);
if
(
!
fp
)
{
msg
(
"Error: cannot open %s"
,
filename
);
result
=
false
;
goto
cleanup
;
}
if
(
fwrite
(
buf
,
buf_len
,
1
,
fp
)
<
1
)
{
result
=
false
;
goto
cleanup
;
}
}
if
(
!
history
)
{
if
(
!
history
)
{
goto
cleanup
;
goto
cleanup
;
...
@@ -1597,8 +1623,11 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
...
@@ -1597,8 +1623,11 @@ write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
free
(
uuid
);
free
(
uuid
);
free
(
server_version
);
free
(
server_version
);
free
(
buf
);
if
(
fp
)
fclose
(
fp
);
return
(
true
);
return
(
result
);
}
}
extern
const
char
*
innodb_checksum_algorithm_names
[];
extern
const
char
*
innodb_checksum_algorithm_names
[];
...
...
extra/mariabackup/backup_mysql.h
View file @
c0db3fe6
...
@@ -68,7 +68,8 @@ bool
...
@@ -68,7 +68,8 @@ bool
write_binlog_info
(
MYSQL
*
connection
);
write_binlog_info
(
MYSQL
*
connection
);
bool
bool
write_xtrabackup_info
(
MYSQL
*
connection
,
const
char
*
filename
,
bool
history
);
write_xtrabackup_info
(
MYSQL
*
connection
,
const
char
*
filename
,
bool
history
,
bool
stream
);
bool
bool
write_backup_config_file
();
write_backup_config_file
();
...
...
extra/mariabackup/xtrabackup.cc
View file @
c0db3fe6
...
@@ -3984,7 +3984,7 @@ static bool xtrabackup_backup_low()
...
@@ -3984,7 +3984,7 @@ static bool xtrabackup_backup_low()
}
}
sprintf
(
filename
,
"%s/%s"
,
xtrabackup_extra_lsndir
,
sprintf
(
filename
,
"%s/%s"
,
xtrabackup_extra_lsndir
,
XTRABACKUP_INFO
);
XTRABACKUP_INFO
);
if
(
!
write_xtrabackup_info
(
mysql_connection
,
filename
,
false
))
{
if
(
!
write_xtrabackup_info
(
mysql_connection
,
filename
,
false
,
false
))
{
msg
(
"Error: failed to write info "
msg
(
"Error: failed to write info "
"to '%s'."
,
filename
);
"to '%s'."
,
filename
);
return
false
;
return
false
;
...
...
mysql-test/suite/mariabackup/extra_lsndir_stream.result
0 → 100644
View file @
c0db3fe6
xtrabackup_checkpoints
xtrabackup_info
mysql-test/suite/mariabackup/extra_lsndir_stream.test
0 → 100644
View file @
c0db3fe6
let
$extra_lsndir
=
$MYSQLTEST_VARDIR
/
tmp
/
extra_lsndir
;
mkdir
$extra_lsndir
;
--
disable_result_log
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
stream
=
xbstream
--
extra
-
lsndir
=
$extra_lsndir
>
/
dev
/
null
;
--
enable_result_log
list_files
$extra_lsndir
;
rmdir
$extra_lsndir
;
mysql-test/suite/mariabackup/mdev-18438.result
0 → 100644
View file @
c0db3fe6
stream.xb
mysql-test/suite/mariabackup/mdev-18438.test
0 → 100644
View file @
c0db3fe6
let
$basedir
=
$MYSQLTEST_VARDIR
/
tmp
/
mdev
-
18438
;
mkdir
$basedir
;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
extra
-
lsndir
=
$basedir
/
extra_lsndir
--
stream
=
xbstream
>
$basedir
/
stream
.
xb
;
mkdir
$basedir
/
backup
;
rmdir
$basedir
/
extra_lsndir
;
--
disable_result_log
exec
$XBSTREAM
-
x
-
C
$basedir
/
backup
<
$basedir
/
stream
.
xb
;
--
enable_result_log
rmdir
$basedir
/
backup
;
list_files
$basedir
;
rmdir
$basedir
;
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