From 43e19b3fc8cb2a0d4a726c3ea822a369e60c5adc Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Sat, 23 Apr 2016 12:15:18 +0400 Subject: [PATCH 1/2] Fixed compilation failure due to unused var. --- client/mysql.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 43c09cafe9e..9d255b55430 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4898,11 +4898,11 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate) { if (!inited) { - int errret; - inited=1; #ifdef HAVE_SETUPTERM + int errret; have_curses= setupterm((char *)0, 1, &errret) != ERR; #endif + inited=1; } if (info_type == INFO_ERROR) { From 51a32ebeb3653bfed481a3ddbfe5f93aecdf4a35 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Wed, 27 Apr 2016 12:29:25 -0400 Subject: [PATCH 2/2] MDEV-9884: Existing /var/lib/mysql/.sst directory (with contents) causes SST to fail with xtrabackup-v2 [Fix taken from https://github.com/percona/percona-xtradb- cluster/commit/b3ee75949ed82b88f355ca2e26431350cc1c89ac] During SST, the receiver node creates .sst directory under datadir to process/prepare the received data and removes it at the end of the process. In case of error, this directory, however, was not removed, which later caused subsequent SSTs to fail. Fixed by removing this directory at the beginning of SST if it existed. --- scripts/wsrep_sst_xtrabackup-v2.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index c7eb474c919..962c170dc1b 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -853,7 +853,8 @@ then then if [[ -d ${DATA}/.sst ]];then - wsrep_log_info "WARNING: Stale temporary SST directory: ${DATA}/.sst from previous state transfer" + wsrep_log_info "WARNING: Stale temporary SST directory: ${DATA}/.sst from previous state transfer. Removing" + rm -rf ${DATA}/.sst fi mkdir -p ${DATA}/.sst (recv_joiner $DATA/.sst "${stagemsg}-SST" 0 0) &