Skip to content
Permalink
Browse files
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.
  • Loading branch information
sysprg committed Dec 27, 2022
1 parent 72e2d1d commit 6710fe4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
@@ -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) {
@@ -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);

0 comments on commit 6710fe4

Please sign in to comment.