Commit 6710fe4b authored by Julius Goryavsky's avatar Julius Goryavsky

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.
parent 72e2d1d2
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment