Merge lp:~percona-core/percona-xtradb-cluster/bug-1405668-5.5 into lp:percona-xtradb-cluster/5.5

Proposed by Raghavendra D Prabhu on 2015-01-27
Status: Work in progress
Proposed branch: lp:~percona-core/percona-xtradb-cluster/bug-1405668-5.5
Merge into: lp:percona-xtradb-cluster/5.5
Diff against target: 424 lines (+94/-108)
7 files modified
percona-xtradb-cluster-tests/conf/conf20.cnf-node1 (+1/-1)
percona-xtradb-cluster-tests/conf/conf20.cnf-node2 (+1/-1)
percona-xtradb-cluster-tests/t/xb_galera_sst_advanced-v2.sh (+3/-2)
scripts/clustercheck.sh (+0/-92)
scripts/wsrep_sst_xtrabackup-v2.sh (+71/-10)
sql/wsrep_mysqld.cc (+14/-2)
sql/wsrep_sst.cc (+4/-0)
To merge this branch: bzr merge lp:~percona-core/percona-xtradb-cluster/bug-1405668-5.5
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2015-01-27 Resubmit on 2015-02-23
Review via email: mp+247762@code.launchpad.net
To post a comment you must log in.
Alexey Kopytov (akopytov) wrote :

Please resubmit on Github.

review: Resubmit

Unmerged revisions

843. By Raghavendra D Prabhu on 2015-01-05

Bug#1405985 Port the fixes of lp:1407599 and lp:1405985

842. By Raghavendra D Prabhu on 2015-01-04

Merge changes from trunk-25-bug-1380697

841. By Raghavendra D Prabhu on 2015-01-04

Merge trunk-25-bug-1402166

840. By Raghavendra D Prabhu on 2015-01-04

Merge trunk-25-bug-1380697

839. By Raghavendra D Prabhu on 2015-01-04

Merge trunk-25-bug-1403566/

838. By Raghavendra D Prabhu on 2015-01-04

Merge trunk-25-bug-1402338

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'percona-xtradb-cluster-tests/conf/conf20.cnf-node1'
2--- percona-xtradb-cluster-tests/conf/conf20.cnf-node1 2014-02-08 14:16:24 +0000
3+++ percona-xtradb-cluster-tests/conf/conf20.cnf-node1 2015-01-27 18:30:35 +0000
4@@ -15,5 +15,5 @@
5 encrypt-key=6F3AD9F428143F133FD7D50D77D91EA4
6
7 [sst]
8-cpat='.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$\|.*\.borr$\|.*\.brn$'
9+cpat='.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$\|.*\.borr$\|.*\.brn$'
10 encrypt=1
11
12=== modified file 'percona-xtradb-cluster-tests/conf/conf20.cnf-node2'
13--- percona-xtradb-cluster-tests/conf/conf20.cnf-node2 2014-02-08 14:16:24 +0000
14+++ percona-xtradb-cluster-tests/conf/conf20.cnf-node2 2015-01-27 18:30:35 +0000
15@@ -15,5 +15,5 @@
16 encrypt-key=6F3AD9F428143F133FD7D50D77D91EA4
17
18 [sst]
19-cpat='.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$\|.*\.borr$\|.*\.brn$'
20+cpat='.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$\|.*\.borr$\|.*\.brn$'
21 encrypt=1
22
23=== modified file 'percona-xtradb-cluster-tests/t/xb_galera_sst_advanced-v2.sh'
24--- percona-xtradb-cluster-tests/t/xb_galera_sst_advanced-v2.sh 2013-11-28 09:31:22 +0000
25+++ percona-xtradb-cluster-tests/t/xb_galera_sst_advanced-v2.sh 2015-01-27 18:30:35 +0000
26@@ -12,6 +12,7 @@
27 SUSER="root"
28 SMDSUM="d35d212fdfe9452e711704e3dc3e93cf"
29 EXTRAFILE=${CONF:-}
30+ADDNLOP=${ADDNLOP:-""}
31
32
33 if [[ -n ${EXTRAFILE:-} ]];then
34@@ -33,7 +34,7 @@
35
36 vlog "Starting server $node1"
37 MYSQLD_EXTRA_MY_CNF_OPTS="!include $EXTRAFILE1"
38-start_server_with_id $node1 --innodb_flush_method=O_DIRECT --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-slave-threads=2 --innodb_file_per_table --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm:// --wsrep_sst_receive_address=$recv_addr1 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$listen_addr1${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug
39+start_server_with_id $node1 --innodb_flush_method=O_DIRECT --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-slave-threads=2 --innodb_file_per_table --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm:// --wsrep_sst_receive_address=$recv_addr1 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$listen_addr1${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug $ADDNLOP
40
41 vlog "Sleeping before loading data"
42 sleep 8
43@@ -48,7 +49,7 @@
44
45 vlog "Starting server $node2"
46 MYSQLD_EXTRA_MY_CNF_OPTS="!include $EXTRAFILE2"
47-start_server_with_id $node2 --innodb_flush_method=O_DIRECT --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-slave-threads=2 --innodb_file_per_table --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm://$listen_addr1 --wsrep_sst_receive_address=$recv_addr2 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$listen_addr2${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug
48+start_server_with_id $node2 --innodb_flush_method=O_DIRECT --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-slave-threads=2 --innodb_file_per_table --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --wsrep_cluster_address=gcomm://$listen_addr1 --wsrep_sst_receive_address=$recv_addr2 --wsrep_node_incoming_address=$ADDR --wsrep_provider_options="gmcast.listen_addr=tcp://$listen_addr2${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug $ADDNLOP
49 switch_server $node2
50
51 # The password propagates through SST
52
53=== added file 'scripts/clustercheck.sh'
54--- scripts/clustercheck.sh 1970-01-01 00:00:00 +0000
55+++ scripts/clustercheck.sh 2015-01-27 18:30:35 +0000
56@@ -0,0 +1,94 @@
57+#!/bin/bash
58+#
59+# Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly
60+#
61+# Authors:
62+# Raghavendra Prabhu <raghavendra.prabhu@percona.com>
63+# Olaf van Zandwijk <olaf.vanzandwijk@nedap.com>
64+#
65+# Based on the original script from Unai Rodriguez and Olaf (https://github.com/olafz/percona-clustercheck)
66+#
67+# Grant privileges required:
68+# GRANT PROCESS ON *.* TO 'clustercheckuser'@'localhost' IDENTIFIED BY 'clustercheckpassword!';
69+
70+if [[ $1 == '-h' || $1 == '--help' ]];then
71+ echo "Usage: $0 <user> <pass> <available_when_donor=0|1> <log_file> <available_when_readonly=0|1> <defaults_extra_file>"
72+ exit
73+fi
74+
75+MYSQL_USERNAME="${1-clustercheckuser}"
76+MYSQL_PASSWORD="${2-clustercheckpassword!}"
77+AVAILABLE_WHEN_DONOR=${3:-0}
78+ERR_FILE="${4:-/dev/null}"
79+AVAILABLE_WHEN_READONLY=${5:-1}
80+DEFAULTS_EXTRA_FILE=${6:-/etc/my.cnf}
81+#Timeout exists for instances where mysqld may be hung
82+TIMEOUT=10
83+
84+EXTRA_ARGS=""
85+if [[ -n "$MYSQL_USERNAME" ]]; then
86+ EXTRA_ARGS="$EXTRA_ARGS --user=${MYSQL_USERNAME}"
87+fi
88+if [[ -n "$MYSQL_PASSWORD" ]]; then
89+ EXTRA_ARGS="$EXTRA_ARGS --password=${MYSQL_PASSWORD}"
90+fi
91+if [[ -r $DEFAULTS_EXTRA_FILE ]];then
92+ MYSQL_CMDLINE="mysql --defaults-extra-file=$DEFAULTS_EXTRA_FILE -nNE --connect-timeout=$TIMEOUT \
93+ ${EXTRA_ARGS}"
94+else
95+ MYSQL_CMDLINE="mysql -nNE --connect-timeout=$TIMEOUT ${EXTRA_ARGS}"
96+fi
97+#
98+# Perform the query to check the wsrep_local_state
99+#
100+WSREP_STATUS=($($MYSQL_CMDLINE -e "SHOW GLOBAL STATUS LIKE 'wsrep_%';" \
101+ 2>${ERR_FILE} | grep -A 1 -E 'wsrep_local_state$|wsrep_cluster_status$' \
102+ | sed -n -e '2p' -e '5p' | tr '\n' ' '))
103+
104+if [[ ${WSREP_STATUS[1]} == 'Primary' && ( ${WSREP_STATUS[0]} -eq 4 || \
105+ ( ${WSREP_STATUS[0]} -eq 2 && $AVAILABLE_WHEN_DONOR -eq 1 ) ) ]]
106+then
107+
108+ # Check only when set to 0 to avoid latency in response.
109+ if [[ $AVAILABLE_WHEN_READONLY -eq 0 ]];then
110+ READ_ONLY=$($MYSQL_CMDLINE -e "SHOW GLOBAL VARIABLES LIKE 'read_only';" \
111+ 2>${ERR_FILE} | tail -1 2>>${ERR_FILE})
112+
113+ if [[ "${READ_ONLY}" == "ON" ]];then
114+ # Percona XtraDB Cluster node local state is 'Synced', but it is in
115+ # read-only mode. The variable AVAILABLE_WHEN_READONLY is set to 0.
116+ # => return HTTP 503
117+ # Shell return-code is 1
118+ echo -en "HTTP/1.1 503 Service Unavailable\r\n"
119+ echo -en "Content-Type: text/plain\r\n"
120+ echo -en "Connection: close\r\n"
121+ echo -en "Content-Length: 43\r\n"
122+ echo -en "\r\n"
123+ echo -en "Percona XtraDB Cluster Node is read-only.\r\n"
124+ sleep 0.1
125+ exit 1
126+ fi
127+
128+ fi
129+ # Percona XtraDB Cluster node local state is 'Synced' => return HTTP 200
130+ # Shell return-code is 0
131+ echo -en "HTTP/1.1 200 OK\r\n"
132+ echo -en "Content-Type: text/plain\r\n"
133+ echo -en "Connection: close\r\n"
134+ echo -en "Content-Length: 40\r\n"
135+ echo -en "\r\n"
136+ echo -en "Percona XtraDB Cluster Node is synced.\r\n"
137+ sleep 0.1
138+ exit 0
139+else
140+ # Percona XtraDB Cluster node local state is not 'Synced' => return HTTP 503
141+ # Shell return-code is 1
142+ echo -en "HTTP/1.1 503 Service Unavailable\r\n"
143+ echo -en "Content-Type: text/plain\r\n"
144+ echo -en "Connection: close\r\n"
145+ echo -en "Content-Length: 57\r\n"
146+ echo -en "\r\n"
147+ echo -en "Percona XtraDB Cluster Node is not synced or non-PRIM. \r\n"
148+ sleep 0.1
149+ exit 1
150+fi
151
152=== removed file 'scripts/clustercheck.sh'
153--- scripts/clustercheck.sh 2014-08-30 06:05:25 +0000
154+++ scripts/clustercheck.sh 1970-01-01 00:00:00 +0000
155@@ -1,92 +0,0 @@
156-#!/bin/bash
157-#
158-# Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly
159-#
160-# Authors:
161-# Raghavendra Prabhu <raghavendra.prabhu@percona.com>
162-# Olaf van Zandwijk <olaf.vanzandwijk@nedap.com>
163-#
164-# Based on the original script from Unai Rodriguez and Olaf (https://github.com/olafz/percona-clustercheck)
165-#
166-# Grant privileges required:
167-# GRANT PROCESS ON *.* TO 'clustercheckuser'@'localhost' IDENTIFIED BY 'clustercheckpassword!';
168-
169-if [[ $1 == '-h' || $1 == '--help' ]];then
170- echo "Usage: $0 <user> <pass> <available_when_donor=0|1> <log_file> <available_when_readonly=0|1> <defaults_extra_file>"
171- exit
172-fi
173-
174-MYSQL_USERNAME="${1-clustercheckuser}"
175-MYSQL_PASSWORD="${2-clustercheckpassword!}"
176-AVAILABLE_WHEN_DONOR=${3:-0}
177-ERR_FILE="${4:-/dev/null}"
178-AVAILABLE_WHEN_READONLY=${5:-1}
179-DEFAULTS_EXTRA_FILE=${6:-/etc/my.cnf}
180-#Timeout exists for instances where mysqld may be hung
181-TIMEOUT=10
182-
183-EXTRA_ARGS=""
184-if [[ -n "$MYSQL_USERNAME" ]]; then
185- EXTRA_ARGS="$EXTRA_ARGS --user=${MYSQL_USERNAME}"
186-fi
187-if [[ -n "$MYSQL_PASSWORD" ]]; then
188- EXTRA_ARGS="$EXTRA_ARGS --password=${MYSQL_PASSWORD}"
189-fi
190-if [[ -r $DEFAULTS_EXTRA_FILE ]];then
191- MYSQL_CMDLINE="mysql --defaults-extra-file=$DEFAULTS_EXTRA_FILE -nNE --connect-timeout=$TIMEOUT \
192- ${EXTRA_ARGS}"
193-else
194- MYSQL_CMDLINE="mysql -nNE --connect-timeout=$TIMEOUT ${EXTRA_ARGS}"
195-fi
196-#
197-# Perform the query to check the wsrep_local_state
198-#
199-WSREP_STATUS=$($MYSQL_CMDLINE -e "SHOW STATUS LIKE 'wsrep_local_state';" \
200- 2>${ERR_FILE} | tail -1 2>>${ERR_FILE})
201-
202-if [[ "${WSREP_STATUS}" == "4" ]] || [[ "${WSREP_STATUS}" == "2" && ${AVAILABLE_WHEN_DONOR} == 1 ]]
203-then
204-
205- # Check only when set to 0 to avoid latency in response.
206- if [[ $AVAILABLE_WHEN_READONLY -eq 0 ]];then
207- READ_ONLY=$($MYSQL_CMDLINE -e "SHOW GLOBAL VARIABLES LIKE 'read_only';" \
208- 2>${ERR_FILE} | tail -1 2>>${ERR_FILE})
209-
210- if [[ "${READ_ONLY}" == "ON" ]];then
211- # Percona XtraDB Cluster node local state is 'Synced', but it is in
212- # read-only mode. The variable AVAILABLE_WHEN_READONLY is set to 0.
213- # => return HTTP 503
214- # Shell return-code is 1
215- echo -en "HTTP/1.1 503 Service Unavailable\r\n"
216- echo -en "Content-Type: text/plain\r\n"
217- echo -en "Connection: close\r\n"
218- echo -en "Content-Length: 43\r\n"
219- echo -en "\r\n"
220- echo -en "Percona XtraDB Cluster Node is read-only.\r\n"
221- sleep 0.1
222- exit 1
223- fi
224-
225- fi
226- # Percona XtraDB Cluster node local state is 'Synced' => return HTTP 200
227- # Shell return-code is 0
228- echo -en "HTTP/1.1 200 OK\r\n"
229- echo -en "Content-Type: text/plain\r\n"
230- echo -en "Connection: close\r\n"
231- echo -en "Content-Length: 40\r\n"
232- echo -en "\r\n"
233- echo -en "Percona XtraDB Cluster Node is synced.\r\n"
234- sleep 0.1
235- exit 0
236-else
237- # Percona XtraDB Cluster node local state is not 'Synced' => return HTTP 503
238- # Shell return-code is 1
239- echo -en "HTTP/1.1 503 Service Unavailable\r\n"
240- echo -en "Content-Type: text/plain\r\n"
241- echo -en "Connection: close\r\n"
242- echo -en "Content-Length: 44\r\n"
243- echo -en "\r\n"
244- echo -en "Percona XtraDB Cluster Node is not synced.\r\n"
245- sleep 0.1
246- exit 1
247-fi
248
249=== modified file 'scripts/wsrep_sst_xtrabackup-v2.sh'
250--- scripts/wsrep_sst_xtrabackup-v2.sh 2014-09-04 18:46:14 +0000
251+++ scripts/wsrep_sst_xtrabackup-v2.sh 2015-01-27 18:30:35 +0000
252@@ -29,6 +29,8 @@
253 encrypt=0
254 nproc=1
255 ecode=0
256+ssyslog=""
257+ssystag=""
258 XTRABACKUP_PID=""
259 SST_PORT=""
260 REMOTEIP=""
261@@ -308,6 +310,15 @@
262 iapts=$(parse_cnf sst inno-apply-opts "")
263 impts=$(parse_cnf sst inno-move-opts "")
264 stimeout=$(parse_cnf sst sst-initial-timeout 100)
265+ ssyslog=$(parse_cnf sst sst-syslog 0)
266+ ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}")
267+ ssystag+="-"
268+
269+ if [[ $ssyslog -ne -1 ]];then
270+ if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld_safe | tr '_' '-' | grep -q -- "--syslog";then
271+ ssyslog=1
272+ fi
273+ fi
274 }
275
276 get_stream()
277@@ -363,6 +374,14 @@
278 if [[ -n ${STATDIR:-} ]];then
279 [[ -d $STATDIR ]] && rm -rf $STATDIR
280 fi
281+
282+ sleep 10
283+
284+ # Final cleanup
285+ pgid=$(ps -o pgid= $$ | grep -o '[0-9]*')
286+ kill -TERM -$pgid || true
287+
288+ exit $estatus
289 }
290
291 check_pid()
292@@ -403,6 +422,14 @@
293 if [[ -n $itmpdir ]];then
294 [[ -d $itmpdir ]] && rm -rf $itmpdir || true
295 fi
296+
297+ sleep 10
298+
299+ # Final cleanup
300+ pgid=$(ps -o pgid= $$ | grep -o '[0-9]*')
301+ kill -TERM -$pgid || true
302+
303+ exit $estatus
304 }
305
306 kill_xtrabackup()
307@@ -551,19 +578,48 @@
308
309 read_cnf
310 setup_ports
311+
312+if ${INNOBACKUPEX_BIN} /tmp --help 2>/dev/null | grep -q -- '--version-check'; then
313+ disver="--no-version-check"
314+fi
315+
316+
317+INNOEXTRA=""
318+
319+if [[ $ssyslog -eq 1 ]];then
320+
321+ if [[ ! -x `which logger` ]];then
322+ wsrep_log_error "logger not in path: $PATH. Ignoring"
323+ else
324+
325+ wsrep_log_info "Logging all stderr of SST/Innobackupex to syslog"
326+
327+ exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE)
328+
329+ wsrep_log_error()
330+ {
331+ logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
332+ }
333+
334+ wsrep_log_info()
335+ {
336+ logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
337+ }
338+
339+ INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-apply "
340+ INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-move "
341+ INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> >(logger -p daemon.err -t ${ssystag}innobackupex-backup)"
342+ fi
343+
344+else
345+ INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log"
346+ INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log"
347+ INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log"
348+fi
349+
350 get_stream
351 get_transfer
352
353-if ${INNOBACKUPEX_BIN} /tmp --help | grep -q -- '--version-check'; then
354- disver="--no-version-check"
355-fi
356-
357-
358-INNOEXTRA=""
359-INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log"
360-INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log"
361-INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log"
362-
363 if [ "$WSREP_SST_OPT_ROLE" = "donor" ]
364 then
365 trap cleanup_donor EXIT
366@@ -810,6 +866,11 @@
367
368 get_proc
369
370+ if [[ ! -s ${DATA}/xtrabackup_checkpoints ]];then
371+ wsrep_log_error "xtrabackup_checkpoints missing, failed innobackupex/SST on donor"
372+ exit 2
373+ fi
374+
375 # Rebuild indexes for compact backups
376 if grep -q 'compact = 1' ${DATA}/xtrabackup_checkpoints;then
377 wsrep_log_info "Index compaction detected"
378
379=== modified file 'sql/wsrep_mysqld.cc'
380--- sql/wsrep_mysqld.cc 2014-08-25 18:02:27 +0000
381+++ sql/wsrep_mysqld.cc 2015-01-27 18:30:35 +0000
382@@ -1375,13 +1375,25 @@
383 int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
384 const TABLE_LIST* table_list)
385 {
386-
387+ LEX *lex;
388 /*
389 No isolation for applier or replaying threads.
390 */
391 if (thd->wsrep_exec_mode == REPL_RECV) return 0;
392
393- int ret= 0;
394+ lex = thd->lex;
395+ if (!wsrep_replicate_myisam && lex->create_info.db_type && lex->create_info.db_type->db_type == DB_TYPE_MYISAM)
396+ {
397+ if (db_) {
398+ WSREP_INFO("Cannot replicate MyISAM DDL for %s.%s with wsrep_replicate_myisam OFF", db_, table_);
399+ } else {
400+ WSREP_INFO("Cannot replicate MyISAM DDL with wsrep_replicate_myisam OFF");
401+ }
402+
403+ return 0;
404+ }
405+
406+ int ret= 0;
407 mysql_mutex_lock(&thd->LOCK_wsrep_thd);
408
409 if (thd->wsrep_conflict_state == MUST_ABORT)
410
411=== modified file 'sql/wsrep_sst.cc'
412--- sql/wsrep_sst.cc 2015-01-09 18:57:00 +0000
413+++ sql/wsrep_sst.cc 2015-01-27 18:30:35 +0000
414@@ -384,6 +384,10 @@
415 {
416 WSREP_ERROR("Failed to read uuid:seqno from joiner script.");
417 if (proc.error()) err = proc.error();
418+ }
419+ else if ((err=proc.error()))
420+ {
421+ WSREP_ERROR("SST script aborted with error %d (%s)", err,strerror(err));
422 }
423 else
424 {

Subscribers

People subscribed via source and target branches

to all changes: