Merge lp:~gl-az/percona-xtrabackup/bug1243009-2.2 into lp:percona-xtrabackup/2.2

Proposed by George Ormond Lorch III
Status: Work in progress
Proposed branch: lp:~gl-az/percona-xtrabackup/bug1243009-2.2
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 430 lines (+89/-42)
17 files modified
xtrabackup/test/inc/common.sh (+13/-3)
xtrabackup/test/run.sh (+20/-4)
xtrabackup/test/t/bug1037379.sh (+2/-2)
xtrabackup/test/t/bug1112224.sh (+1/-1)
xtrabackup/test/t/bug483827.sh (+4/-10)
xtrabackup/test/t/bug664986.sh (+4/-4)
xtrabackup/test/t/bug729843.sh (+1/-1)
xtrabackup/test/t/bug740489.sh (+1/-1)
xtrabackup/test/t/bug996493.sh (+1/-1)
xtrabackup/test/t/history_on_server.sh (+1/-1)
xtrabackup/test/t/ib_doublewrite.sh (+3/-7)
xtrabackup/test/t/ib_empty_dir.sh (+1/-1)
xtrabackup/test/t/ib_slave_info.sh (+1/-1)
xtrabackup/test/t/kill_long_selects.sh (+2/-2)
xtrabackup/test/t/version_check.sh (+7/-1)
xtrabackup/utils/build-binary.sh (+14/-1)
xtrabackup/utils/build.sh (+13/-1)
To merge this branch: bzr merge lp:~gl-az/percona-xtrabackup/bug1243009-2.2
Reviewer Review Type Date Requested Status
Vlad Lesin (community) g2 Needs Fixing
Alexey Kopytov Pending
Review via email: mp+195445@code.launchpad.net

This proposal supersedes a proposal from 2013-10-22.

Description of the change

Fix for bug 1243009 --debug and --valgrind options needed for XtraBackup's build-binary.sh

util/build-binary.sh:
Added new options --debug, --relwithdebinfo and --valgrind. These will set and export the DEBUG, RELWITHDEBINFO and VALGRIND variables to 'yes' before calling build.sh if specified. Even though they are mutually exclusive, there is no explicit test for this case.

util/build.sh:
Added testing for RELWITHDEBINFO and VALGRIND variables and set up build/make options necessary for each case.

test/run.sh and test/inc/common.sh:
Added -v N option to run.sh to allow enabling of valgrind when using test suite. N specifies a value that will be passed to valgrinds --error-exitcode option. Made changes to accomplish this based on Alexey Kopytovs suggestions.
Moved innobackupex_no_defaults_file into inc/common.sh from t/ib_doublewrite.sh since the concept is used in a few tests and correct fixup of IB_ARGS[@] is necessary in order to preserve args and valgrind options and makes a couple test cases a little simpler.

Fixed up several test cases that use/depend on $IB_ARGS to use "${IB_ARGS[@]}".

jenkins http://jenkins.percona.com/view/XtraBackup/job/percona-xtrabackup-2.2-param/42/
jenkins with '-v 0 -T 1600' options http://jenkins.percona.com/view/XtraBackup/job/percona-xtrabackup-2.2-param/44/

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Same question as in the 2.0 MP.

review: Needs Information
Revision history for this message
Vlad Lesin (vlad-lesin) wrote :
review: Needs Fixing (g2)

Unmerged revisions

4893. By George Ormond Lorch III

Fix for bug 1243009 --debug and --valgrind options needed for XtraBackup's build-binary.sh

util/build-binary.sh:
  Added new options --debug, --relwithdebinfo and --valgrind. These will set and export the DEBUG, RELWITHDEBINFO and VALGRIND variables to 'yes' before calling build.sh if specified. Even though they are mutually exclusive, there is no explicit test for this case.

util/build.sh:
  Added testing for RELWITHDEBINFO and VALGRIND variables and set up build/make options necessary for each case.

test/run.sh and test/inc/common.sh:
  Added -v N option to run.sh to allow enabling of valgrind when using test suite. N specifies a value that will be bassed to valgrinds --error-exitcode option. Made changes to accomplish this based on Alexey Kopytovs suggestions.
  Moved innobackupex_no_defaults_file into inc/common.sh from t/ib_doublewrite.sh since the concept is used in a few tests and correct fixup of IB_ARGS[@] is necessary in order to preserve args and valgrind options and makes a couple test cases a little simpler.

Fixed up several test cases that use/depend on $IB_ARGS to use "${IB_ARGS[@]}".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'xtrabackup/test/inc/common.sh'
2--- xtrabackup/test/inc/common.sh 2013-11-07 12:23:43 +0000
3+++ xtrabackup/test/inc/common.sh 2013-11-15 20:35:14 +0000
4@@ -2,9 +2,19 @@
5
6 function innobackupex()
7 {
8- run_cmd $IB_BIN $IB_ARGS $*
9+ run_cmd $IB_BIN "${IB_ARGS[@]}" $*
10 }
11+function innobackupex_no_defaults_file()
12+{
13+ local IB_ARGS_NO_DEFAULTS_FILE=()
14+ for arg in "${IB_ARGS[@]}"; do
15+ if [[ $arg != "--defaults-file="* ]]; then
16+ IB_ARGS_NO_DEFAULTS_FILE[${#IB_ARGS_NO_DEFAULTS_FILE[@]}]=$arg
17+ fi
18+ done
19
20+ run_cmd $IB_BIN "${IB_ARGS_NO_DEFAULTS_FILE[@]}" $*
21+}
22 function xtrabackup()
23 {
24 run_cmd $XB_BIN $XB_ARGS $*
25@@ -239,8 +249,8 @@
26 MYSQLD_ARGS="$MYSQLD_ARGS --user=root"
27 fi
28
29- IB_ARGS="--defaults-file=$MYSQLD_VARDIR/my.cnf --ibbackup=$XB_BIN \
30---no-version-check"
31+ IB_ARGS=("--defaults-file=$MYSQLD_VARDIR/my.cnf" "--ibbackup=$XB_BIN"
32+ "--no-version-check")
33 XB_ARGS="--defaults-file=$MYSQLD_VARDIR/my.cnf"
34
35 # Some aliases for compatibility, as tests use the following names
36
37=== modified file 'xtrabackup/test/run.sh'
38--- xtrabackup/test/run.sh 2013-09-23 05:21:56 +0000
39+++ xtrabackup/test/run.sh 2013-11-15 20:35:14 +0000
40@@ -38,10 +38,11 @@
41 function usage()
42 {
43 cat <<EOF
44-Usage: $0 [-f] [-g] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf]
45+Usage: $0 [-f] [-g] [-v child_error_exit] [-h] [-s suite] [-t test_name] [-d mysql_basedir] [-c build_conf]
46 -f Continue running tests after failures
47 -d path Server installation directory. Default is './server'.
48 -g Debug mode
49+-v N Run XtraBackup binary through "valgrind --error-exitcode=N".
50 -t path Run only a single named test
51 -h Print this help message
52 -s suite Select a test suite to run. Possible values: experimental, t.
53@@ -440,7 +441,12 @@
54 vlog "Cannot find '$XB_BIN' in PATH"
55 return 1
56 fi
57- XB_BIN="$XB_PATH"
58+ if [ -z "$VALGRIND" ]
59+ then
60+ XB_BIN="$XB_PATH"
61+ else
62+ XB_BIN="valgrind --error-exitcode=$VALGRIND $XB_PATH"
63+ fi
64
65 # Set the correct binary for innobackupex
66 IB_BIN="`which innobackupex`"
67@@ -771,8 +777,9 @@
68 SUBUNIT_OUT=test_results.subunit
69 NWORKERS=
70 DEBUG_WORKER=""
71+VALGRIND=""
72
73-while getopts "fgh?:t:s:d:c:j:T:" options; do
74+while getopts "fgh?:t:s:d:c:j:v:T:" options; do
75 case $options in
76 f ) force="yes";;
77 t )
78@@ -786,6 +793,15 @@
79 ;;
80
81 g ) DEBUG=on;;
82+ v )
83+ if [[ ! $OPTARG =~ ^[0-9]+$ ]]
84+ then
85+ echo "Wrong -v argument: $OPTARG"
86+ exit -1
87+ fi
88+ VALGRIND="$OPTARG"
89+ ;;
90+
91 h ) usage; exit;;
92 s ) tname="$OPTARG/*.sh";;
93 d ) export MYSQL_BASEDIR="$OPTARG";;
94@@ -844,7 +860,7 @@
95 echo "Running against $MYSQL_FLAVOR $MYSQL_VERSION ($INNODB_FLAVOR $INNODB_VERSION)" |
96 tee -a $OUTFILE
97
98-echo "Using '`basename $XB_BIN`' as xtrabackup binary" | tee -a $OUTFILE
99+echo "Using '$XB_BIN' as xtrabackup binary" | tee -a $OUTFILE
100
101 [ -z "$NWORKERS" ] && autocalc_nworkers
102
103
104=== modified file 'xtrabackup/test/t/bug1037379.sh'
105--- xtrabackup/test/t/bug1037379.sh 2012-10-16 15:05:23 +0000
106+++ xtrabackup/test/t/bug1037379.sh 2013-11-15 20:35:14 +0000
107@@ -40,7 +40,7 @@
108 ################################################################################
109
110 # The following will fail due to a timeout
111-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp --safe-slave-backup \
112+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp --safe-slave-backup \
113 --safe-slave-backup-timeout=3 $topdir/backup1
114
115 grep -q "Slave_open_temp_tables did not become zero" $OUTFILE
116@@ -57,7 +57,7 @@
117 run_cmd $MYSQL $MYSQL_ARGS -e "STOP SLAVE SQL_THREAD"
118
119 # The following will fail due to a timeout
120-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp --safe-slave-backup \
121+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp --safe-slave-backup \
122 --safe-slave-backup-timeout=3 $topdir/backup2
123
124 grep -c "Slave_open_temp_tables did not become zero" $OUTFILE | grep -w 2
125
126=== modified file 'xtrabackup/test/t/bug1112224.sh'
127--- xtrabackup/test/t/bug1112224.sh 2013-03-18 14:13:04 +0000
128+++ xtrabackup/test/t/bug1112224.sh 2013-11-15 20:35:14 +0000
129@@ -35,7 +35,7 @@
130 vlog "Log applied to full backup"
131
132 # Command should fail and print error message
133-run_cmd_expect_failure $IB_BIN $IB_ARGS --apply-log --redo-only --incremental-dir=$topdir/inc \
134+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --apply-log --redo-only --incremental-dir=$topdir/inc \
135 $topdir/full
136 if ! grep -q "Cannot handle DDL operation" $OUTFILE
137 then
138
139=== modified file 'xtrabackup/test/t/bug483827.sh'
140--- xtrabackup/test/t/bug483827.sh 2013-04-27 18:46:54 +0000
141+++ xtrabackup/test/t/bug483827.sh 2013-11-15 20:35:14 +0000
142@@ -2,12 +2,6 @@
143 # Bug #483827: support for mysqld_multi
144 ########################################################################
145
146-function modify_args()
147-{
148- XB_ARGS=`echo $XB_ARGS | sed -e 's/my.cnf/my_multi.cnf/'`
149- IB_ARGS=`echo $IB_ARGS | sed -e 's/my.cnf/my_multi.cnf/'`
150-}
151-
152 . inc/common.sh
153
154 start_server
155@@ -15,14 +9,14 @@
156 backup_dir=$topdir/backup
157
158 # change defaults file from my.cnf to my_multi.cnf
159-modify_args
160+XB_ARGS=`echo $XB_ARGS | sed -e 's/my.cnf/my_multi.cnf/'`
161
162 # make my_multi.cnf
163 sed -e 's/\[mysqld\]/[mysqld1]/' $topdir/my.cnf > $topdir/my_multi.cnf
164
165 # Backup
166-innobackupex --no-timestamp --defaults-group=mysqld1 $backup_dir
167-innobackupex --apply-log $backup_dir
168+innobackupex_no_defaults_file --defaults-file=$topdir/my_multi.cnf --no-timestamp --defaults-group=mysqld1 $backup_dir
169+innobackupex_no_defaults_file --defaults-file=$topdir/my_multi.cnf --apply-log $backup_dir
170
171 stop_server
172
173@@ -30,7 +24,7 @@
174 rm -rf ${mysql_datadir}/*
175
176 # restore backup
177-innobackupex --copy-back --defaults-group=mysqld1 $backup_dir
178+innobackupex_no_defaults_file --defaults-file=$topdir/my_multi.cnf --copy-back --defaults-group=mysqld1 $backup_dir
179
180 # make sure that data are in correct place
181 if [ ! -f ${mysql_datadir}/ibdata1 ] ; then
182
183=== modified file 'xtrabackup/test/t/bug664986.sh'
184--- xtrabackup/test/t/bug664986.sh 2013-07-03 18:30:28 +0000
185+++ xtrabackup/test/t/bug664986.sh 2013-11-15 20:35:14 +0000
186@@ -18,23 +18,23 @@
187 # Test that wrong directory permissions result in a backup failure
188 # for both InnoDB and non-InnoDB files
189 chmod 000 $MYSQLD_DATADIR/test_bug664986_innodb
190-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp $topdir/backup
191+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp $topdir/backup
192 chmod 777 $MYSQLD_DATADIR/test_bug664986_innodb
193 rm -rf $topdir/backup
194
195 chmod 000 $MYSQLD_DATADIR/test_bug664986_myisam
196-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp $topdir/backup
197+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp $topdir/backup
198 chmod 777 $MYSQLD_DATADIR/test_bug664986_myisam
199 rm -rf $topdir/backup
200
201 # Test that wrong file permissions result in a backup failure
202 # for both InnoDB and non-InnoDB files
203 chmod 000 $MYSQLD_DATADIR/test_bug664986_innodb/t.ibd
204-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp $topdir/backup
205+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp $topdir/backup
206 chmod 644 $MYSQLD_DATADIR/test_bug664986_innodb/t.ibd
207 rm -rf $topdir/backup
208
209 chmod 000 $MYSQLD_DATADIR/test_bug664986_myisam/t.MYD
210-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp $topdir/backup
211+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp $topdir/backup
212 chmod 644 $MYSQLD_DATADIR/test_bug664986_myisam/t.MYD
213 rm -rf $topdir/backup
214
215=== modified file 'xtrabackup/test/t/bug729843.sh'
216--- xtrabackup/test/t/bug729843.sh 2013-02-05 11:54:27 +0000
217+++ xtrabackup/test/t/bug729843.sh 2013-11-15 20:35:14 +0000
218@@ -12,7 +12,7 @@
219 # Don't use run_cmd_* or innobackupex functions here to avoid logging
220 # the full command line (including the password in plaintext)
221 set +e
222-$IB_BIN $IB_ARGS --password=secretpassword $topdir/backup 2>&1 | tee $logfile
223+$IB_BIN "${IB_ARGS[@]}" --password=secretpassword $topdir/backup 2>&1 | tee $logfile
224 set -e
225
226 # Check that the password was not logged in plaintext
227
228=== modified file 'xtrabackup/test/t/bug740489.sh'
229--- xtrabackup/test/t/bug740489.sh 2013-04-27 18:46:54 +0000
230+++ xtrabackup/test/t/bug740489.sh 2013-11-15 20:35:14 +0000
231@@ -24,7 +24,7 @@
232 backup_dir=$topdir/backup
233 run_cmd $IB_BIN \
234 --defaults-extra-file=$defaults_extra_file --socket=${MYSQLD_SOCKET} \
235- --ibbackup=$XB_BIN --no-timestamp $backup_dir
236+ "--ibbackup=$XB_BIN" --no-timestamp $backup_dir
237 vlog "Backup created in directory $backup_dir"
238
239 run_cmd ${MYSQL} ${MYSQL_ARGS} --password=password <<EOF
240
241=== modified file 'xtrabackup/test/t/bug996493.sh'
242--- xtrabackup/test/t/bug996493.sh 2013-07-03 18:30:28 +0000
243+++ xtrabackup/test/t/bug996493.sh 2013-11-15 20:35:14 +0000
244@@ -24,7 +24,7 @@
245 # Do not run innobackupex, because it pass option --defaults-file
246 # which we should avoid. Our goal is to test that backup-my.cnf
247 # will be read by default when apply-log is run.
248-run_cmd $IB_BIN --ibbackup=$XB_BIN --apply-log $backup_dir
249+run_cmd $IB_BIN "--ibbackup=$XB_BIN" --apply-log $backup_dir
250
251 vlog "Get my.cnf back"
252 mv $topdir/my.cnf.bak $topdir/my.cnf
253
254=== modified file 'xtrabackup/test/t/history_on_server.sh'
255--- xtrabackup/test/t/history_on_server.sh 2013-11-08 12:00:43 +0000
256+++ xtrabackup/test/t/history_on_server.sh 2013-11-15 20:35:14 +0000
257@@ -180,7 +180,7 @@
258 "--incremental-history-uuid=$third_uuid --stream=xbstream --compress "\
259 "--encrypt=AES256 $backup_dir --encrypt-key=..."
260
261-if [ -z "$val" ] || [ "$val" != "$expected_val" ]
262+if [ $val != *$expected_val ]
263 then
264 vlog "Error: $column in history record invalid, got \"$val\" expected \"$expected_val\""
265 exit 1
266
267=== modified file 'xtrabackup/test/t/ib_doublewrite.sh'
268--- xtrabackup/test/t/ib_doublewrite.sh 2013-07-25 15:04:49 +0000
269+++ xtrabackup/test/t/ib_doublewrite.sh 2013-11-15 20:35:14 +0000
270@@ -23,13 +23,6 @@
271 start_server
272 load_dbase_schema incremental_sample
273
274-# Workaround for bug #1072695
275-IB_ARGS_NO_DEFAULTS_FILE=`echo $IB_ARGS | sed -e 's/--defaults-file=[^ ]* / /'`
276-function innobackupex_no_defaults_file ()
277-{
278- run_cmd $IB_BIN $IB_ARGS_NO_DEFAULTS_FILE $*
279-}
280-
281 # Adding initial rows
282 vlog "Adding initial rows to database..."
283 ${MYSQL} ${MYSQL_ARGS} -e "insert into test values (1, 1);" incremental_sample
284@@ -75,17 +68,20 @@
285 vlog "##############"
286 vlog "# PREPARE #1 #"
287 vlog "##############"
288+# Workaround for bug #1072695
289 innobackupex_no_defaults_file --apply-log --redo-only $full_backup_dir
290 vlog "Log applied to full backup"
291 vlog "##############"
292 vlog "# PREPARE #2 #"
293 vlog "##############"
294+# Workaround for bug #1072695
295 innobackupex_no_defaults_file --apply-log --redo-only --incremental-dir=$inc_backup_dir \
296 $full_backup_dir
297 vlog "Delta applied to full backup"
298 vlog "##############"
299 vlog "# PREPARE #3 #"
300 vlog "##############"
301+# Workaround for bug #1072695
302 innobackupex_no_defaults_file --apply-log $full_backup_dir
303 vlog "Data prepared for restore"
304
305
306=== modified file 'xtrabackup/test/t/ib_empty_dir.sh'
307--- xtrabackup/test/t/ib_empty_dir.sh 2012-10-15 16:14:59 +0000
308+++ xtrabackup/test/t/ib_empty_dir.sh 2013-11-15 20:35:14 +0000
309@@ -22,7 +22,7 @@
310 vlog "###########"
311 vlog "# RESTORE #"
312 vlog "###########"
313-run_cmd_expect_failure $IB_BIN $IB_ARGS --copy-back $backup_dir
314+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --copy-back $backup_dir
315
316 if grep -q "is not empty!" $OUTFILE
317 then
318
319=== modified file 'xtrabackup/test/t/ib_slave_info.sh'
320--- xtrabackup/test/t/ib_slave_info.sh 2013-08-18 18:07:09 +0000
321+++ xtrabackup/test/t/ib_slave_info.sh 2013-11-15 20:35:14 +0000
322@@ -18,7 +18,7 @@
323 switch_server $slave_id
324
325 vlog "Check that --slave-info with --no-lock and no --safe-slave-backup fails"
326-run_cmd_expect_failure $IB_BIN $IB_ARGS --no-timestamp --slave-info --no-lock \
327+run_cmd_expect_failure $IB_BIN "${IB_ARGS[@]}" --no-timestamp --slave-info --no-lock \
328 $topdir/backup
329
330 innobackupex --no-timestamp --slave-info $topdir/backup
331
332=== modified file 'xtrabackup/test/t/kill_long_selects.sh'
333--- xtrabackup/test/t/kill_long_selects.sh 2013-10-21 10:32:46 +0000
334+++ xtrabackup/test/t/kill_long_selects.sh 2013-11-15 20:35:14 +0000
335@@ -141,7 +141,7 @@
336
337 sleep 1
338
339-run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
340+run_cmd_expect_failure ${IB_BIN} "${IB_ARGS[@]}" $topdir/full \
341 --lock-wait-timeout=3 \
342 --lock-wait-query-type=all \
343 --lock-wait-threshold=1 \
344@@ -160,7 +160,7 @@
345
346 sleep 2
347
348-run_cmd_expect_failure ${IB_BIN} ${IB_ARGS} $topdir/full \
349+run_cmd_expect_failure ${IB_BIN} "${IB_ARGS[@]}" $topdir/full \
350 --lock-wait-timeout=3 \
351 --lock-wait-query-type=update \
352 --lock-wait-threshold=2 \
353
354=== modified file 'xtrabackup/test/t/version_check.sh'
355--- xtrabackup/test/t/version_check.sh 2013-11-07 12:23:43 +0000
356+++ xtrabackup/test/t/version_check.sh 2013-11-15 20:35:14 +0000
357@@ -35,7 +35,13 @@
358 die "/tmp/percona-version-check has been created with --no-version-check!"
359 fi
360
361-IB_ARGS=`echo $IB_ARGS | sed -e 's/--no-version-check//g'`
362+for ((i=0; i < ${#IB_ARGS[@]}; i++))
363+do
364+ if [ "${IB_ARGS[$i]}" = "--no-version-check" ]
365+ then
366+ IB_ARGS=("${IB_ARGS[@]:0:$i}" "${IB_ARGS[@]:(($i + 1))}")
367+ fi
368+done
369
370 innobackupex --no-timestamp $topdir/backup2
371
372
373=== modified file 'xtrabackup/utils/build-binary.sh'
374--- xtrabackup/utils/build-binary.sh 2013-06-05 08:39:54 +0000
375+++ xtrabackup/utils/build-binary.sh 2013-11-15 20:35:14 +0000
376@@ -22,7 +22,8 @@
377 # Check if we have a functional getopt(1)
378 if ! getopt --test
379 then
380- go_out="$(getopt --options="i" --longoptions=i686 \
381+ go_out="$(getopt --options="drvi" \
382+ --longoptions="debug, relwithdebinfo, valgrind, i686" \
383 --name="$(basename "$0")" -- "$@")"
384 test $? -eq 0 || exit 1
385 eval set -- $go_out
386@@ -32,6 +33,18 @@
387 do
388 case "$arg" in
389 -- ) shift; break;;
390+ -d | --debug )
391+ shift
392+ export DEBUG=yes
393+ ;;
394+ -r | --relwithdebinfo )
395+ shift
396+ export RELWITHDEBINFO=yes
397+ ;;
398+ -v | --valgrind )
399+ shift
400+ export VALGRIND=yes
401+ ;;
402 -i | --i686 )
403 shift
404 TARGET="i686"
405
406=== modified file 'xtrabackup/utils/build.sh'
407--- xtrabackup/utils/build.sh 2013-07-20 14:24:26 +0000
408+++ xtrabackup/utils/build.sh 2013-11-15 20:35:14 +0000
409@@ -35,8 +35,20 @@
410 ;;
411 esac
412
413+if [ -n "$VALGRIND" ]
414+then
415+ export CFLAGS="$CFLAGS -g -O0"
416+ export CXXFLAGS="$CXXFLAGS -g -O0"
417+ extra_config_51=
418+ extra_config_55plus="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_VALGRIND=ON"
419+elif [ -n "$RELWITHDEBINFO" ]
420+then
421+ export CFLAGS="$CFLAGS -g -O0"
422+ export CXXFLAGS="$CXXFLAGS -g -O0"
423+ extra_config_51=
424+ extra_config_55plus="-DCMAKE_BUILD_TYPE=RelWithDebInfo"
425 # Percona Server 5.5 does not build with -Werror, so ignore DEBUG for now
426-if [ -n "$DEBUG" -a "$type" != "xtradb55" -a "$type" != "xtradb51" ]
427+elif [ -n "$DEBUG" -a "$type" != "xtradb55" -a "$type" != "xtradb51" ]
428 then
429 # InnoDB extra debug flags
430 innodb_extra_debug="-DUNIV_DEBUG -DUNIV_MEM_DEBUG \

Subscribers

People subscribed via source and target branches