summaryrefslogtreecommitdiff
path: root/extra/mariabackup
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2022-12-26 08:23:16 +0100
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2022-12-27 14:16:15 +0100
commit6710fe4b42a0909072ff8b9fb243e73bcf740ffb (patch)
tree3b743ff793a9bbad91afc549ff2f3f6ce79a34ba /extra/mariabackup
parent72e2d1d2201c2da23777d8fb89e078475e0c1371 (diff)
downloadmariadb-git-6710fe4b42a0909072ff8b9fb243e73bcf740ffb.tar.gz
MDEV-30293: mariabackup fail with --galera-info option without Galera
Without Galera, mariabackup should ignore the --galera-info option and not fail with rc != 0 like it does now. This commit fixes this flaw.
Diffstat (limited to 'extra/mariabackup')
-rw-r--r--extra/mariabackup/backup_copy.cc2
-rw-r--r--extra/mariabackup/backup_mysql.cc8
2 files changed, 6 insertions, 4 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index b1655c95998..23ade2a46be 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -1544,8 +1544,6 @@ bool backup_start(CorruptedPages &corrupted_pages)
if (!write_galera_info(mysql_connection)) {
return(false);
}
- // copied from xtrabackup. what is it needed for here?
- write_current_binlog_file(mysql_connection);
}
if (opt_binlog_info == BINLOG_INFO_ON) {
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 05fc01305b7..b646bbd4ffe 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -1558,14 +1558,18 @@ write_galera_info(MYSQL *connection)
if ((state_uuid == NULL && state_uuid55 == NULL)
|| (last_committed == NULL && last_committed55 == NULL)) {
- msg("Failed to get master wsrep state from SHOW STATUS.");
- result = false;
+ msg("Warning: failed to get master wsrep state from SHOW STATUS.");
+ result = true;
goto cleanup;
}
result = backup_file_printf(XTRABACKUP_GALERA_INFO,
"%s:%s\n", state_uuid ? state_uuid : state_uuid55,
last_committed ? last_committed : last_committed55);
+ if (result)
+ {
+ write_current_binlog_file(connection);
+ }
cleanup:
free_mysql_variables(status);