Commit 396cf60a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-18917 Don't create xtrabackup_binlog_pos_innodb with Mariabackup

parent 7ad355dd
...@@ -66,7 +66,6 @@ unsigned long mysql_server_version = 0; ...@@ -66,7 +66,6 @@ unsigned long mysql_server_version = 0;
/* server capabilities */ /* server capabilities */
bool have_changed_page_bitmaps = false; bool have_changed_page_bitmaps = false;
bool have_backup_locks = false; bool have_backup_locks = false;
bool have_backup_safe_binlog_info = false;
bool have_lock_wait_timeout = false; bool have_lock_wait_timeout = false;
bool have_galera_enabled = false; bool have_galera_enabled = false;
bool have_flush_engine_logs = false; bool have_flush_engine_logs = false;
...@@ -358,8 +357,6 @@ get_mysql_vars(MYSQL *connection) ...@@ -358,8 +357,6 @@ get_mysql_vars(MYSQL *connection)
mysql_variable mysql_vars[] = { mysql_variable mysql_vars[] = {
{"have_backup_locks", &have_backup_locks_var}, {"have_backup_locks", &have_backup_locks_var},
{"have_backup_safe_binlog_info",
&have_backup_safe_binlog_info_var},
{"log_bin", &log_bin_var}, {"log_bin", &log_bin_var},
{"lock_wait_timeout", &lock_wait_timeout_var}, {"lock_wait_timeout", &lock_wait_timeout_var},
{"gtid_mode", &gtid_mode_var}, {"gtid_mode", &gtid_mode_var},
...@@ -392,22 +389,12 @@ get_mysql_vars(MYSQL *connection) ...@@ -392,22 +389,12 @@ get_mysql_vars(MYSQL *connection)
} }
if (opt_binlog_info == BINLOG_INFO_AUTO) { if (opt_binlog_info == BINLOG_INFO_AUTO) {
if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
if (have_backup_safe_binlog_info_var != NULL)
opt_binlog_info = BINLOG_INFO_LOCKLESS;
else if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
opt_binlog_info = BINLOG_INFO_ON; opt_binlog_info = BINLOG_INFO_ON;
else else
opt_binlog_info = BINLOG_INFO_OFF; opt_binlog_info = BINLOG_INFO_OFF;
} }
if (have_backup_safe_binlog_info_var == NULL &&
opt_binlog_info == BINLOG_INFO_LOCKLESS) {
msg("Error: --binlog-info=LOCKLESS is not supported by the "
"server\n");
return(false);
}
if (lock_wait_timeout_var != NULL) { if (lock_wait_timeout_var != NULL) {
have_lock_wait_timeout = true; have_lock_wait_timeout = true;
......
...@@ -366,9 +366,6 @@ uint opt_safe_slave_backup_timeout = 0; ...@@ -366,9 +366,6 @@ uint opt_safe_slave_backup_timeout = 0;
const char *opt_history = NULL; const char *opt_history = NULL;
/* Whether xtrabackup_binlog_info should be created on recovery */
static bool recover_binlog_info;
/* Simple datasink creation tracking...add datasinks in the reverse order you /* Simple datasink creation tracking...add datasinks in the reverse order you
want them destroyed. */ want them destroyed. */
#define XTRABACKUP_MAX_DATASINKS 10 #define XTRABACKUP_MAX_DATASINKS 10
...@@ -1895,9 +1892,6 @@ xtrabackup_read_metadata(char *filename) ...@@ -1895,9 +1892,6 @@ xtrabackup_read_metadata(char *filename)
} }
/* Optional fields */ /* Optional fields */
if (fscanf(fp, "recover_binlog_info = %d\n", &t) == 1) {
recover_binlog_info = (t == 1);
}
end: end:
fclose(fp); fclose(fp);
...@@ -1916,13 +1910,11 @@ xtrabackup_print_metadata(char *buf, size_t buf_len) ...@@ -1916,13 +1910,11 @@ xtrabackup_print_metadata(char *buf, size_t buf_len)
"backup_type = %s\n" "backup_type = %s\n"
"from_lsn = " UINT64PF "\n" "from_lsn = " UINT64PF "\n"
"to_lsn = " UINT64PF "\n" "to_lsn = " UINT64PF "\n"
"last_lsn = " UINT64PF "\n" "last_lsn = " UINT64PF "\n",
"recover_binlog_info = %d\n",
metadata_type, metadata_type,
metadata_from_lsn, metadata_from_lsn,
metadata_to_lsn, metadata_to_lsn,
metadata_last_lsn, metadata_last_lsn);
MY_TEST(opt_binlog_info == BINLOG_INFO_LOCKLESS));
} }
/*********************************************************************** /***********************************************************************
...@@ -6148,17 +6140,6 @@ xtrabackup_prepare_func(int argc, char ** argv) ...@@ -6148,17 +6140,6 @@ xtrabackup_prepare_func(int argc, char ** argv)
trx_sys_print_mysql_binlog_offset(); trx_sys_print_mysql_binlog_offset();
msg("\n"); msg("\n");
/* output to xtrabackup_binlog_pos_innodb and (if
backup_safe_binlog_info was available on the server) to
xtrabackup_binlog_info. In the latter case xtrabackup_binlog_pos_innodb
becomes redundant and is created only for compatibility. */
if (!store_binlog_info("xtrabackup_binlog_pos_innodb") ||
(recover_binlog_info &&
!store_binlog_info(XTRABACKUP_BINLOG_INFO))) {
exit(EXIT_FAILURE);
}
/* Check whether the log is applied enough or not. */ /* Check whether the log is applied enough or not. */
if ((xtrabackup_incremental if ((xtrabackup_incremental
&& srv_start_lsn < incremental_to_lsn) && srv_start_lsn < incremental_to_lsn)
......
...@@ -161,7 +161,7 @@ extern uint opt_safe_slave_backup_timeout; ...@@ -161,7 +161,7 @@ extern uint opt_safe_slave_backup_timeout;
extern const char *opt_history; extern const char *opt_history;
enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_LOCKLESS, BINLOG_INFO_ON, enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_ON,
BINLOG_INFO_AUTO}; BINLOG_INFO_AUTO};
extern ulong opt_binlog_info; extern ulong opt_binlog_info;
......
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