summaryrefslogtreecommitdiff
path: root/extra/mariabackup/backup_mysql.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-24 10:21:26 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-24 10:21:26 +0300
commit6ce0a6f9ad77e7934e27db1b73d6d98064352928 (patch)
tree351d7da0892c9a78310ffc39754c3ec4b38a188e /extra/mariabackup/backup_mysql.cc
parentb5c050563b1bfa1155b3b6a3b7c0c59775e77f13 (diff)
parent882ce206dbf06b771ffe4cbce2e3e4214982f302 (diff)
downloadmariadb-git-6ce0a6f9ad77e7934e27db1b73d6d98064352928.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'extra/mariabackup/backup_mysql.cc')
-rw-r--r--extra/mariabackup/backup_mysql.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 6d804f78e15..83e877ea9bb 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -1083,6 +1083,7 @@ write_slave_info(MYSQL *connection)
char *master = NULL;
char *filename = NULL;
char *gtid_executed = NULL;
+ char *using_gtid = NULL;
char *position = NULL;
char *gtid_slave_pos = NULL;
char *ptr;
@@ -1093,6 +1094,7 @@ write_slave_info(MYSQL *connection)
{"Relay_Master_Log_File", &filename},
{"Exec_Master_Log_Pos", &position},
{"Executed_Gtid_Set", &gtid_executed},
+ {"Using_Gtid", &using_gtid},
{NULL, NULL}
};
@@ -1133,7 +1135,8 @@ write_slave_info(MYSQL *connection)
ut_a(asprintf(&mysql_slave_position,
"master host '%s', purge list '%s'",
master, gtid_executed) != -1);
- } else if (gtid_slave_pos && *gtid_slave_pos) {
+ } else if (gtid_slave_pos && *gtid_slave_pos &&
+ !(using_gtid && !strncmp(using_gtid, "No", 2))) {
/* MariaDB >= 10.0 with GTID enabled */
result = backup_file_printf(XTRABACKUP_SLAVE_INFO,
"SET GLOBAL gtid_slave_pos = '%s';\n"