diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-03-14 16:59:27 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-03-15 11:02:00 +0100 |
commit | 396cf60ac064b47ca0406bf7f870df9880d3ad94 (patch) | |
tree | 5c3e7adaf8af0dbd8d24c98ceb6c1cb3328e4ef2 | |
parent | 7ad355dde70e3aa04b6b173d725db01c6f164d28 (diff) | |
download | mariadb-git-396cf60ac064b47ca0406bf7f870df9880d3ad94.tar.gz |
MDEV-18917 Don't create xtrabackup_binlog_pos_innodb with Mariabackup
-rw-r--r-- | extra/mariabackup/backup_mysql.cc | 15 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 23 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.h | 2 |
3 files changed, 4 insertions, 36 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 93e603133aa..b0c0987d4fe 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -66,7 +66,6 @@ unsigned long mysql_server_version = 0; /* server capabilities */ bool have_changed_page_bitmaps = false; bool have_backup_locks = false; -bool have_backup_safe_binlog_info = false; bool have_lock_wait_timeout = false; bool have_galera_enabled = false; bool have_flush_engine_logs = false; @@ -358,8 +357,6 @@ get_mysql_vars(MYSQL *connection) mysql_variable mysql_vars[] = { {"have_backup_locks", &have_backup_locks_var}, - {"have_backup_safe_binlog_info", - &have_backup_safe_binlog_info_var}, {"log_bin", &log_bin_var}, {"lock_wait_timeout", &lock_wait_timeout_var}, {"gtid_mode", >id_mode_var}, @@ -392,22 +389,12 @@ get_mysql_vars(MYSQL *connection) } if (opt_binlog_info == BINLOG_INFO_AUTO) { - - 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")) + if (log_bin_var != NULL && !strcmp(log_bin_var, "ON")) opt_binlog_info = BINLOG_INFO_ON; else 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) { have_lock_wait_timeout = true; diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index ee7acb1f375..d54f7ab5309 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -366,9 +366,6 @@ uint opt_safe_slave_backup_timeout = 0; 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 want them destroyed. */ #define XTRABACKUP_MAX_DATASINKS 10 @@ -1895,9 +1892,6 @@ xtrabackup_read_metadata(char *filename) } /* Optional fields */ - if (fscanf(fp, "recover_binlog_info = %d\n", &t) == 1) { - recover_binlog_info = (t == 1); - } end: fclose(fp); @@ -1916,13 +1910,11 @@ xtrabackup_print_metadata(char *buf, size_t buf_len) "backup_type = %s\n" "from_lsn = " UINT64PF "\n" "to_lsn = " UINT64PF "\n" - "last_lsn = " UINT64PF "\n" - "recover_binlog_info = %d\n", + "last_lsn = " UINT64PF "\n", metadata_type, metadata_from_lsn, metadata_to_lsn, - metadata_last_lsn, - MY_TEST(opt_binlog_info == BINLOG_INFO_LOCKLESS)); + metadata_last_lsn); } /*********************************************************************** @@ -6148,17 +6140,6 @@ next_node: trx_sys_print_mysql_binlog_offset(); 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. */ if ((xtrabackup_incremental && srv_start_lsn < incremental_to_lsn) diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index e870ecbe2eb..38c0020830e 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -161,7 +161,7 @@ extern uint opt_safe_slave_backup_timeout; 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}; extern ulong opt_binlog_info; |