mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
updated test suite to be able to run 3.23 master and 4.0 slave
got LOAD DATA INFILE replication from 3.23 master to 4.0 slave to work for some reason query_cache now fails - will push anyway and document the failure if I can repeat it.
This commit is contained in:
@ -20,6 +20,7 @@ TZ=GMT-3; export TZ # for UNIX_TIMESTAMP tests to work
|
||||
#--
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin
|
||||
MASTER_40_ARGS="--rpl-recovery-rank=1 --init-rpl-role=master"
|
||||
|
||||
# Standard functions
|
||||
|
||||
@ -58,7 +59,7 @@ sleep_until_file_deleted ()
|
||||
done
|
||||
}
|
||||
|
||||
sleep_until_file_exists ()
|
||||
sleep_until_file_created ()
|
||||
{
|
||||
file=$1
|
||||
loop=$2
|
||||
@ -190,6 +191,11 @@ while test $# -gt 0; do
|
||||
--user=*) DBUSER=`$ECHO "$1" | $SED -e "s;--user=;;"` ;;
|
||||
--force) FORCE=1 ;;
|
||||
--verbose-manager) MANAGER_QUIET_OPT="" ;;
|
||||
--old-master) MASTER_40_ARGS="";;
|
||||
--master-binary=*)
|
||||
MASTER_MYSQLD=`$ECHO "$1" | $SED -e "s;--master-binary=;;"` ;;
|
||||
--slave-binary=*)
|
||||
SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
|
||||
--local) USE_RUNNING_SERVER="" ;;
|
||||
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
|
||||
--local-master)
|
||||
@ -394,6 +400,16 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$MASTER_MYSQLD" ]
|
||||
then
|
||||
MASTER_MYSQLD=$MYSQLD
|
||||
fi
|
||||
|
||||
if [ -z "$SLAVE_MYSQLD" ]
|
||||
then
|
||||
SLAVE_MYSQLD=$MYSQLD
|
||||
fi
|
||||
|
||||
# If we should run all tests cases, we will use a local server for that
|
||||
|
||||
if [ -z "$1" ]
|
||||
@ -430,7 +446,6 @@ GPROF_DIR=$MYSQL_TMP_DIR/gprof
|
||||
GPROF_MASTER=$GPROF_DIR/master.gprof
|
||||
GPROF_SLAVE=$GPROF_DIR/slave.gprof
|
||||
TIMEFILE="$MYSQL_TEST_DIR/var/log/mysqltest-time"
|
||||
SLAVE_MYSQLD=$MYSQLD #this can be changed later if we are doing gcov
|
||||
XTERM=`which xterm`
|
||||
|
||||
#++
|
||||
@ -564,11 +579,11 @@ gprof_prepare ()
|
||||
gprof_collect ()
|
||||
{
|
||||
if [ -f $MASTER_MYDDIR/gmon.out ]; then
|
||||
gprof $MYSQLD $MASTER_MYDDIR/gmon.out > $GPROF_MASTER
|
||||
gprof $MASTER_MYSQLD $MASTER_MYDDIR/gmon.out > $GPROF_MASTER
|
||||
echo "Master execution profile has been saved in $GPROF_MASTER"
|
||||
fi
|
||||
if [ -f $SLAVE_MYDDIR/gmon.out ]; then
|
||||
gprof $MYSQLD $SLAVE_MYDDIR/gmon.out > $GPROF_SLAVE
|
||||
gprof $SLAVE_MYSQLD $SLAVE_MYDDIR/gmon.out > $GPROF_SLAVE
|
||||
echo "Slave execution profile has been saved in $GPROF_SLAVE"
|
||||
fi
|
||||
}
|
||||
@ -708,8 +723,8 @@ start_master()
|
||||
if [ -z "$DO_BENCH" ]
|
||||
then
|
||||
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
|
||||
--server-id=1 --rpl-recovery-rank=1 \
|
||||
--basedir=$MY_BASEDIR --init-rpl-role=master \
|
||||
--server-id=1 \
|
||||
--basedir=$MY_BASEDIR \
|
||||
--port=$MASTER_MYPORT \
|
||||
--exit-info=256 \
|
||||
--core \
|
||||
@ -722,6 +737,7 @@ start_master()
|
||||
--tmpdir=$MYSQL_TMP_DIR \
|
||||
--language=$LANGUAGE \
|
||||
--innodb_data_file_path=ibdata1:50M \
|
||||
$MASTER_40_ARGS \
|
||||
$SMALL_SERVER \
|
||||
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
|
||||
else
|
||||
@ -738,6 +754,7 @@ start_master()
|
||||
--tmpdir=$MYSQL_TMP_DIR \
|
||||
--language=$LANGUAGE \
|
||||
--innodb_data_file_path=ibdata1:50M \
|
||||
$MASTER_40_ARGS \
|
||||
$SMALL_SERVER \
|
||||
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
|
||||
fi
|
||||
@ -749,14 +766,14 @@ start_master()
|
||||
then
|
||||
$ECHO "set args $master_args" > $GDB_MASTER_INIT
|
||||
manager_launch master ddd -display $DISPLAY --debugger \
|
||||
"gdb -x $GDB_MASTER_INIT" $MYSQLD
|
||||
"gdb -x $GDB_MASTER_INIT" $MASTER_MYSQLD
|
||||
elif [ x$DO_GDB = x1 ]
|
||||
then
|
||||
if [ x$MANUAL_GDB = x1 ]
|
||||
then
|
||||
$ECHO "set args $master_args" > $GDB_MASTER_INIT
|
||||
$ECHO "To start gdb for the master , type in another window:"
|
||||
$ECHO "cd $CWD ; gdb -x $GDB_MASTER_INIT $MYSQLD"
|
||||
$ECHO "cd $CWD ; gdb -x $GDB_MASTER_INIT $MASTER_MYSQLD"
|
||||
wait_for_master=1500
|
||||
else
|
||||
( $ECHO set args $master_args;
|
||||
@ -770,12 +787,12 @@ r
|
||||
EOF
|
||||
fi ) > $GDB_MASTER_INIT
|
||||
manager_launch master $XTERM -display $DISPLAY \
|
||||
-title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD
|
||||
-title "Master" -e gdb -x $GDB_MASTER_INIT $MASTER_MYSQLD
|
||||
fi
|
||||
else
|
||||
manager_launch master $MYSQLD $master_args
|
||||
manager_launch master $MASTER_MYSQLD $master_args
|
||||
fi
|
||||
sleep_until_file_exists $MASTER_MYPID $wait_for_master
|
||||
sleep_until_file_created $MASTER_MYPID $wait_for_master
|
||||
wait_for_master=$SLEEP_TIME_FOR_SECOND_MASTER
|
||||
MASTER_RUNNING=1
|
||||
}
|
||||
@ -866,7 +883,7 @@ start_slave()
|
||||
if [ x$MANUAL_GDB = x1 ]
|
||||
then
|
||||
echo "To start gdb for the slave, type in another window:"
|
||||
echo "cd $CWD ; gdb -x $GDB_SLAVE_INIT $MYSQLD"
|
||||
echo "cd $CWD ; gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD"
|
||||
wait_for_slave=1500
|
||||
else
|
||||
manager_launch $slave_ident $XTERM -display $DISPLAY -title "Slave" -e \
|
||||
@ -876,7 +893,7 @@ start_slave()
|
||||
manager_launch $slave_ident $SLAVE_MYSQLD $slave_args
|
||||
fi
|
||||
eval "SLAVE$1_RUNNING=1"
|
||||
sleep_until_file_exists $slave_pid $wait_for_slave
|
||||
sleep_until_file_created $slave_pid $wait_for_slave
|
||||
wait_for_slave=$SLEEP_TIME_FOR_SECOND_SLAVE
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user