@@ -24,7 +24,7 @@ for i in 000; do
2424done
2525}
2626
27- for i in $( seq 0 35 ) ; do
27+ for i in $( seq 0 40 ) ; do
2828 ret[$i ]=0
2929done
3030
153153cat mysqldump-php_test012.sql | grep -E -e ' 50001 (CREATE|VIEW)' -e ' 50013 DEFINER' -e ' CREATE.*TRIGGER' > mysqldump-php_test012.filtered.sql
154154cat mysqldump-php_test013.sql | grep INSERT > mysqldump-php_test013.filtered.sql
155155
156- echo test $index diff test001.filtered.sql mysqldump_test001.filtered.sql
156+ test= " test $index diff test001.filtered.sql mysqldump_test001.filtered.sql"
157157diff test001.filtered.sql mysqldump_test001.filtered.sql
158158ret[(( index++ )) ]=$?
159- echo test $index diff mysqldump_test001_complete.filtered.sql mysqldump-php_test001_complete.filtered.sql
159+ if [[ $? -ne 0 ]]; then echo $test ; fi
160+
161+ test=" test $index diff mysqldump_test001_complete.filtered.sql mysqldump-php_test001_complete.filtered.sql"
160162diff mysqldump_test001_complete.filtered.sql mysqldump-php_test001_complete.filtered.sql
161163ret[(( index++ )) ]=$?
164+ if [[ $? -ne 0 ]]; then echo $test ; fi
162165
163- echo test $index diff test002.filtered.sql mysqldump_test002.filtered.sql
166+ test= " test $index diff test002.filtered.sql mysqldump_test002.filtered.sql"
164167diff test002.filtered.sql mysqldump_test002.filtered.sql
165168ret[(( index++ )) ]=$?
169+ if [[ $? -ne 0 ]]; then echo $test ; fi
166170
167- echo test $index diff test001.filtered.sql mysqldump-php_test001.filtered.sql
171+ test= " test $index diff test001.filtered.sql mysqldump-php_test001.filtered.sql"
168172diff test001.filtered.sql mysqldump-php_test001.filtered.sql
169173ret[(( index++ )) ]=$?
170- echo test $index diff test002.filtered.sql mysqldump-php_test002.filtered.sql
174+ if [[ $? -ne 0 ]]; then echo $test ; fi
175+
176+ test=" test $index diff test002.filtered.sql mysqldump-php_test002.filtered.sql"
171177diff test002.filtered.sql mysqldump-php_test002.filtered.sql
172178ret[(( index++ )) ]=$?
179+ if [[ $? -ne 0 ]]; then echo $test ; fi
173180
174- echo test $index diff test001.src.checksum mysqldump-php_test001.checksum
181+ test= " test $index diff test001.src.checksum mysqldump-php_test001.checksum"
175182diff test001.src.checksum mysqldump-php_test001.checksum
176183ret[(( index++ )) ]=$?
177- echo test $index diff test002.src.checksum mysqldump-php_test002.checksum
184+ if [[ $? -ne 0 ]]; then echo $test ; fi
185+
186+ test=" test $index diff test002.src.checksum mysqldump-php_test002.checksum"
178187diff test002.src.checksum mysqldump-php_test002.checksum
179188ret[(( index++ )) ]=$?
180- echo test $index diff test005.src.checksum mysqldump-php_test005.checksum
189+ if [[ $? -ne 0 ]]; then echo $test ; fi
190+
191+ test=" test $index diff test005.src.checksum mysqldump-php_test005.checksum"
181192diff test005.src.checksum mysqldump-php_test005.checksum
182193ret[(( index++ )) ]=$?
194+ if [[ $? -ne 0 ]]; then echo $test ; fi
183195
184- echo test $index diff mysqldump_test005.filtered.sql mysqldump-php_test005.filtered.sql
196+ test= " test $index diff mysqldump_test005.filtered.sql mysqldump-php_test005.filtered.sql"
185197diff mysqldump_test005.filtered.sql mysqldump-php_test005.filtered.sql
186198ret[(( index++ )) ]=$?
199+ if [[ $? -ne 0 ]]; then echo $test ; fi
187200
188- echo test $index diff test008.filtered.sql mysqldump-php_test008.filtered.sql
201+ test= " test $index diff test008.filtered.sql mysqldump-php_test008.filtered.sql"
189202diff test008.filtered.sql mysqldump-php_test008.filtered.sql
190203ret[(( index++ )) ]=$?
204+ if [[ $? -ne 0 ]]; then echo $test ; fi
191205
192- # test reset-auto-increment
193- echo test $index cat mysqldump-php_test009.sql \| grep -i ENGINE \| grep AUTO_INCREMENT
194- test009=` cat mysqldump-php_test009.sql | grep -i ENGINE | grep AUTO_INCREMENT`
195- if [[ -z $test009 ]]; then ret[(( index++ )) ]=0; else ret[(( index++ )) ]=1; fi
206+ # test reset-auto-increment, make sure we don't find an AUTO_INCREMENT
207+ test=" test $index cat mysqldump-php_test009.sql \| grep -i ENGINE \| grep AUTO_INCREMENT"
208+ cat mysqldump-php_test009.sql | grep -i ENGINE | (! grep AUTO_INCREMENT)
209+ ret[(( index++ )) ]=$?
210+ if [[ $? -ne 0 ]]; then echo $test ; fi
196211
197212# test backup events
198- echo test $index diff test010.filtered.sql mysqldump-php_test010.filtered.sql
213+ test= " test $index diff test010.filtered.sql mysqldump-php_test010.filtered.sql"
199214diff test010.filtered.sql mysqldump-php_test010.filtered.sql
200215ret[(( index++ )) ]=$?
216+ if [[ $? -ne 0 ]]; then echo $test ; fi
201217
202218if [[ $major -eq 5 && $medium -ge 7 ]]; then
203219 # test virtual column support, with simple inserts forced to complete (a) and complete inserts (b)
204- echo test $index diff test011.filtered.sql mysqldump-php_test011a.filtered.sql
220+ test= " test $index diff test011.filtered.sql mysqldump-php_test011a.filtered.sql"
205221 diff test011.filtered.sql mysqldump-php_test011a.filtered.sql
206222 ret[(( index++ )) ]=$?
207- echo test $index diff test011.filtered.sql mysqldump-php_test011b.filtered.sql
223+ if [[ $? -ne 0 ]]; then echo $test ; fi
224+ test=" test $index diff test011.filtered.sql mysqldump-php_test011b.filtered.sql"
208225 diff test011.filtered.sql mysqldump-php_test011b.filtered.sql
209226 ret[(( index++ )) ]=$?
227+ if [[ $? -ne 0 ]]; then echo $test ; fi
210228else
211229 echo test011 disabled, only valid for mysql server version > 5.7.0
212230fi
213231
214232# Test create views, events, trigger
215- echo test $index diff mysqldump_test012.filtered.sql mysqldump-php_test012.filtered.sql
233+ test= " test $index diff mysqldump_test012.filtered.sql mysqldump-php_test012.filtered.sql"
216234diff mysqldump_test012.filtered.sql mysqldump-php_test012.filtered.sql
217235ret[(( index++ )) ]=$?
236+ if [[ $? -ne 0 ]]; then echo $test ; fi
218237
219238# Make sure we do not find a DEFINER
220- echo test $index grep ' DEFINER' mysqldump-php_test012_no-definer.sql
239+ test= " test $index grep 'DEFINER' mysqldump-php_test012_no-definer.sql"
221240! grep ' DEFINER' mysqldump-php_test012_no-definer.sql
222241ret[(( index++ )) ]=$?
242+ if [[ $? -ne 0 ]]; then echo $test ; fi
223243
224244# test INSERT IGNORE
225- echo test $index diff mysqldump_test013.filtered.sql mysqldump-php_test013.filtered.sql
245+ test= " test $index diff mysqldump_test013.filtered.sql mysqldump-php_test013.filtered.sql"
226246diff mysqldump_test013.filtered.sql mysqldump-php_test013.filtered.sql
227247ret[(( index++ )) ]=$?
248+ if [[ $? -ne 0 ]]; then echo $test ; fi
228249
229250rm * .checksum 2> /dev/null
230251rm * .filtered.sql 2> /dev/null
0 commit comments