summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/mysql-test-run.sh')
-rw-r--r--mysql-test/mysql-test-run.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 137e99f48b3..8800055a3bb 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -323,11 +323,15 @@ while test $# -gt 0; do
$ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --client-gdb option"
fi
DO_CLIENT_GDB=1
+ EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
+ EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
;;
--manual-gdb )
DO_GDB=1
MANUAL_GDB=1
USE_RUNNING_SERVER=""
+ EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
+ EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
;;
--ddd )
if [ x$BINARY_DIST = x1 ] ; then
@@ -335,6 +339,8 @@ while test $# -gt 0; do
fi
DO_DDD=1
USE_RUNNING_SERVER=""
+ EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
+ EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
;;
--valgrind)
VALGRIND="valgrind --alignment=8 --leak-check=yes --num-callers=16"
@@ -567,7 +573,9 @@ error () {
}
error_is () {
- $CAT < $TIMEFILE | $SED -e 's/.* At line \(.*\)\: \(.*\)/ \>\> Error at line \1: \2<\</' | $HEAD -1
+ $ECHO "Errors are (from $TIMEFILE) :"
+ $CAT < $TIMEFILE
+ $ECHO "(the last line(s) may be the ones that caused the die() in mysqltest)"
}
prefix_to_8() {
@@ -1068,6 +1076,16 @@ stop_slave ()
fi
}
+stop_slave_threads ()
+{
+ eval "this_slave_running=\$SLAVE$1_RUNNING"
+ slave_ident="slave$1"
+ if [ x$this_slave_running = x1 ]
+ then
+ $MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$slave_ident.sock stop-slave > /dev/null 2>&1
+ fi
+}
+
stop_master ()
{
if [ x$MASTER_RUNNING = x1 ]
@@ -1161,6 +1179,12 @@ run_testcase ()
return
fi
+ # Stop all slave threads, so that we don't have useless reconnection attempts
+ # and error messages in case the slave and master servers restart.
+ stop_slave_threads
+ stop_slave_threads 1
+ stop_slave_threads 2
+
if [ -z "$USE_RUNNING_SERVER" ] ;
then
if [ -f $master_opt_file ] ;