diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-20 10:26:49 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-20 10:41:32 +0200 |
commit | 514b305dfb2839c619a623bbdae5f21cf0077672 (patch) | |
tree | 2f9700f05ccf0ddc7e46a547d9a191404e8dbbd7 /extra/mariabackup | |
parent | de51acd03730311505677eb7212756e7126183b3 (diff) | |
parent | 117291db8b35ddb4cd8c89ee4d8de888160b7163 (diff) | |
download | mariadb-git-514b305dfb2839c619a623bbdae5f21cf0077672.tar.gz |
Merge 10.3 into 10.4
The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c
was skipped. In Galera 4, the implementation would seem to require
changes to the streaming replication.
In the tests archive.rnd_pos main.profiling, disable_ps_protocol
for SHOW STATUS and SHOW PROFILE commands until MDEV-18974
has been fixed.
Diffstat (limited to 'extra/mariabackup')
-rw-r--r-- | extra/mariabackup/backup_mysql.cc | 18 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 48 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.h | 2 |
3 files changed, 4 insertions, 64 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 5c310c1a261..b0ee0420049 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -68,7 +68,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; @@ -336,7 +335,6 @@ get_mysql_vars(MYSQL *connection) char *version_comment_var = NULL; char *innodb_version_var = NULL; char *have_backup_locks_var = NULL; - char *have_backup_safe_binlog_info_var = NULL; char *log_bin_var = NULL; char *lock_wait_timeout_var= NULL; char *wsrep_on_var = NULL; @@ -360,8 +358,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}, @@ -394,23 +390,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"); - return(false); - } - if (lock_wait_timeout_var != NULL) { have_lock_wait_timeout = true; } @@ -1716,4 +1701,3 @@ mdl_unlock_all() mysql_close(mdl_con); spaceid_to_tablename.clear(); } - diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index c5408ef03f5..c903b374797 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -363,9 +363,6 @@ struct ddl_tracker_t { static ddl_tracker_t ddl_tracker; -/* 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 @@ -2012,7 +2009,6 @@ xtrabackup_read_metadata(char *filename) { FILE *fp; my_bool r = TRUE; - int t; fp = fopen(filename,"r"); if(!fp) { @@ -2043,9 +2039,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); @@ -2064,13 +2057,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); } /*********************************************************************** @@ -5295,27 +5286,6 @@ innodb_free_param() } -/** Store the current binary log coordinates in a specified file. -@param[in] filename file name -@param[in] name binary log file name -@param[in] pos binary log file position -@return whether the operation succeeded */ -static bool -store_binlog_info(const char* filename, const char* name, ulonglong pos) -{ - FILE *fp = fopen(filename, "w"); - - if (!fp) { - msg("mariabackup: failed to open '%s'", filename); - return(false); - } - - fprintf(fp, "%s\t%llu\n", name, pos); - fclose(fp); - - return(true); -} - /** Check if file exists*/ static bool file_exists(std::string name) { @@ -5581,20 +5551,6 @@ xtrabackup_prepare_func(char** argv) msg("Last binlog file %s, position %lld", trx_sys.recovered_binlog_filename, longlong(trx_sys.recovered_binlog_offset)); - - /* 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. */ - ok = store_binlog_info("xtrabackup_binlog_pos_innodb", - trx_sys.recovered_binlog_filename, - trx_sys.recovered_binlog_offset) - && (!recover_binlog_info - || store_binlog_info(XTRABACKUP_BINLOG_INFO, - trx_sys.recovered_binlog_filename, - trx_sys.recovered_binlog_offset)); } /* Check whether the log is applied enough or not. */ diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index 767efe14b50..25943ea7d98 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -141,7 +141,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; |