summaryrefslogtreecommitdiff
path: root/extra/mariabackup/backup_mysql.cc
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-11 17:07:36 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-11 17:07:36 +0200
commit3eecb8db227173284aff8c457dea3c8009117a72 (patch)
tree5d872cd355fe2af0363250f18db5bdea749aaeac /extra/mariabackup/backup_mysql.cc
parentbf1e09e0c472600165887b6ad52b993a00394f5a (diff)
downloadmariadb-git-3eecb8db227173284aff8c457dea3c8009117a72.tar.gz
MDEV-25356: SST scripts should use the new mariabackup interfacebb-10.2-MDEV-25356
SST scripts for Galera should use the new mariabackup interface instead of the innobackupex interface, which is currently only supported for compatibility reasons. This commit converts the SST script for mariabackup to use the new interface. It does not need separate tests, as any problems will be seen as failures when running multiple tests for the mariabackup-based SST.
Diffstat (limited to 'extra/mariabackup/backup_mysql.cc')
-rw-r--r--extra/mariabackup/backup_mysql.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 1d7242c5c75..824b8b6d5f3 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -44,6 +44,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <mysql.h>
#include <mysqld.h>
#include <my_sys.h>
+#include <stdlib.h>
#include <string.h>
#include <limits>
#include "common.h"
@@ -107,6 +108,13 @@ xb_mysql_connect()
return(NULL);
}
+#if !defined(DONT_USE_MYSQL_PWD)
+ if (!opt_password)
+ {
+ opt_password=getenv("MYSQL_PWD");
+ }
+#endif
+
if (!opt_secure_auth) {
mysql_options(connection, MYSQL_SECURE_AUTH,
(char *) &opt_secure_auth);