mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Remove old cruft from the tree: mysqltestmanager, mysql_test_run_new,
and various stuff in Docs/. Also move the certificates used for testing into mysql-test/std_data from the top-level SSL directory (now gone). BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7: Delete: mysql-test/init_db.sql BitKeeper/deleted/.del-my_create_tables.c~c121a0c4c427ebb: Delete: mysql-test/my_create_tables.c BitKeeper/deleted/.del-my_manage.c~4de50e721d227d19: Delete: mysql-test/my_manage.c BitKeeper/deleted/.del-my_manage.h~9d2cbc1e8bc894f: Delete: mysql-test/my_manage.h BitKeeper/deleted/.del-mysql_test_run_new.c~a23ab2c4b28b25ad: Delete: mysql-test/mysql_test_run_new.c mysql-test/mysql-test-run.sh: Remove code that uses old mysqltestmanager BitKeeper/deleted/.del-Makefile.am~abb265028eb9b6a7: Delete: tools/Makefile.am BitKeeper/deleted/.del-managertest1.nc~96a5c1c5c2d33085: Delete: tools/managertest1.nc BitKeeper/deleted/.del-mysqlmanager-sample.pwd~712b89f01aaad84a: Delete: tools/mysqlmanager-sample.pwd BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b: Delete: tools/mysqlmanager.c BitKeeper/deleted/.del-client-req.pem~efd482e1d290d4d8: Delete: SSL/client-req.pem BitKeeper/deleted/.del-run-client~e683192d4f3821e0: Delete: SSL/run-client BitKeeper/deleted/.del-server-req.pem~16301893cacf1be4: Delete: SSL/server-req.pem BitKeeper/deleted/.del-run-server~55426778bc206c48: Delete: SSL/run-server BitKeeper/deleted/.del-Makefile.am~de166d6fcac3b9b6: Delete: SSL/Makefile.am BitKeeper/deleted/.del-NOTES~e926d3e6929ac052: Delete: SSL/NOTES BitKeeper/deleted/.del-mysqlmanager-pwgen.c~d8f5f91ec54432b9: Delete: client/mysqlmanager-pwgen.c BitKeeper/deleted/.del-mysqlmanagerc.c~4f6e3499e68508f6: Delete: client/mysqlmanagerc.c BitKeeper/deleted/.del-algor.eps~1a57aff065918206: Delete: Docs/Books/algor.eps BitKeeper/deleted/.del-bk.txt~ffd510fa9531f87c: Delete: Docs/bk.txt BitKeeper/deleted/.del-algor.gif~72c40c3bad198f2f: Delete: Docs/Books/algor.gif BitKeeper/deleted/.del-algor.txt~37d2b5c1290e3cfa: Delete: Docs/Books/algor.txt BitKeeper/deleted/.del-dbi.eps~7b1032f98de7736d: Delete: Docs/Books/dbi.eps BitKeeper/deleted/.del-dbi.gif~8f6861147437298b: Delete: Docs/Books/dbi.gif BitKeeper/deleted/.del-dbi.txt~f5cf3fe321168fd5: Delete: Docs/Books/dbi.txt BitKeeper/deleted/.del-dubois.eps~f24e09a7fa420436: Delete: Docs/Books/dubois.eps BitKeeper/deleted/.del-dubois.gif~e02d361b13b1c4a4: Delete: Docs/Books/dubois.gif BitKeeper/deleted/.del-dubois.txt~998581cf9040fcc: Delete: Docs/Books/dubois.txt BitKeeper/deleted/.del-ecomm.eps~17833026ebd7656: Delete: Docs/Books/ecomm.eps BitKeeper/deleted/.del-ecomm.gif~f9bce6949b171613: Delete: Docs/Books/ecomm.gif BitKeeper/deleted/.del-ecomm.txt~27494674104ee9db: Delete: Docs/Books/ecomm.txt BitKeeper/deleted/.del-in_21.eps~8150d06653dab178: Delete: Docs/Books/in_21.eps BitKeeper/deleted/.del-in_21.gif~4a0b14f6d76458a9: Delete: Docs/Books/in_21.gif BitKeeper/deleted/.del-in_21.txt~448fb4b3d8c0b34e: Delete: Docs/Books/in_21.txt BitKeeper/deleted/.del-manual.eps~1c2ebcea50b4840c: Delete: Docs/Books/manual.eps BitKeeper/deleted/.del-manual.gif~657cf08119b1b3fc: Delete: Docs/Books/manual.gif BitKeeper/deleted/.del-manual.txt~4702af61ea5e3c29: Delete: Docs/Books/manual.txt BitKeeper/deleted/.del-msql.eps~f3801b9d166ae4fc: Delete: Docs/Books/msql.eps BitKeeper/deleted/.del-msql.gif~72ea7c6d307b9108: Delete: Docs/Books/msql.gif BitKeeper/deleted/.del-msql.txt~235ae568824f4073: Delete: Docs/Books/msql.txt BitKeeper/deleted/.del-prof.eps~1f54d9a56eb2b908: Delete: Docs/Books/prof.eps BitKeeper/deleted/.del-prof.gif~2fa8ed201d9d05fe: Delete: Docs/Books/prof.gif BitKeeper/deleted/.del-prof.txt~9fc04ec3e5ce8361: Delete: Docs/Books/prof.txt BitKeeper/deleted/.del-pthreads.eps~2ca8ff2d1181b2c0: Delete: Docs/Books/pthreads.eps BitKeeper/deleted/.del-pthreads.gif~2d9460dec2577859: Delete: Docs/Books/pthreads.gif BitKeeper/deleted/.del-pthreads.txt~fc9e17d021335a39: Delete: Docs/Books/pthreads.txt BitKeeper/deleted/.del-realmen.eps~cc022325d3cb045: Delete: Docs/Books/realmen.eps BitKeeper/deleted/.del-realmen.gif~86113e3b1fcbd597: Delete: Docs/Books/realmen.gif BitKeeper/deleted/.del-realmen.txt~81c30565a8f06539: Delete: Docs/Books/realmen.txt BitKeeper/deleted/.del-sql-99.eps~f85c06de7a016c7d: Delete: Docs/Books/sql-99.eps BitKeeper/deleted/.del-sql-99.gif~df369376884a5689: Delete: Docs/Books/sql-99.gif BitKeeper/deleted/.del-sql-99.txt~eff316adac3dd5b8: Delete: Docs/Books/sql-99.txt BitKeeper/deleted/.del-Tutorial-MySQL-final.txt~6e5b88fe4217504d: Delete: Docs/Tutorial-MySQL-final.txt BitKeeper/deleted/.del-mysql-01.gif~6f3f2e474b834ac6: Delete: Docs/MySQL-logos/mysql-01.gif BitKeeper/deleted/.del-mysql-02.gif~5e03e2ffa6bd060f: Delete: Docs/MySQL-logos/mysql-02.gif BitKeeper/deleted/.del-mysql-03.gif~a510e3599346cd5f: Delete: Docs/MySQL-logos/mysql-03.gif BitKeeper/deleted/.del-mysql-04.gif~6c3fdc91da64574: Delete: Docs/MySQL-logos/mysql-04.gif BitKeeper/deleted/.del-mysql-05.gif~230c28315136655: Delete: Docs/MySQL-logos/mysql-05.gif BitKeeper/deleted/.del-mysql-06.gif~8bb16461fd45634e: Delete: Docs/MySQL-logos/mysql-06.gif BitKeeper/deleted/.del-mysql-07.gif~b86f918998a2114e: Delete: Docs/MySQL-logos/mysql-07.gif BitKeeper/deleted/.del-mysql-08.gif~50fb4d886f82e8bc: Delete: Docs/MySQL-logos/mysql-08.gif BitKeeper/deleted/.del-mysql-09.gif~17604ce9d92cd94a: Delete: Docs/MySQL-logos/mysql-09.gif BitKeeper/deleted/.del-mysql-10.gif~a8b5306c4d911f8e: Delete: Docs/MySQL-logos/mysql-10.gif BitKeeper/deleted/.del-mysql-11.gif~8495404458978524: Delete: Docs/MySQL-logos/mysql-11.gif BitKeeper/deleted/.del-mysql-12.gif~18d47c1ad5aef481: Delete: Docs/MySQL-logos/mysql-12.gif BitKeeper/deleted/.del-mysql-13.gif~1ad2eedf58da3aaa: Delete: Docs/MySQL-logos/mysql-13.gif BitKeeper/deleted/.del-mysql-14.gif~a11e7df8653ad1b1: Delete: Docs/MySQL-logos/mysql-14.gif BitKeeper/deleted/.del-mysql-15.gif~64c998fdd6fc1ae1: Delete: Docs/MySQL-logos/mysql-15.gif BitKeeper/deleted/.del-mysql-16.gif~6a6c86de2f85f0f5: Delete: Docs/MySQL-logos/mysql-16.gif BitKeeper/deleted/.del-mysql-17.gif~b07962578d0952b1: Delete: Docs/MySQL-logos/mysql-17.gif BitKeeper/deleted/.del-mysql_anim-01.gif~d27d4f0c1a2a6da9: Delete: Docs/MySQL-logos/mysql_anim-01.gif BitKeeper/deleted/.del-mysql_anim-02.gif~476224d724007343: Delete: Docs/MySQL-logos/mysql_anim-02.gif BitKeeper/deleted/.del-mysql_anim-03.gif~470dd9c9a8bd55fc: Delete: Docs/MySQL-logos/mysql_anim-03.gif BitKeeper/deleted/.del-mysql_anim-04.gif~14f429c87c0c718: Delete: Docs/MySQL-logos/mysql_anim-04.gif BitKeeper/deleted/.del-mysql_anim-05.gif~e63e7f003b77ad95: Delete: Docs/MySQL-logos/mysql_anim-05.gif BitKeeper/deleted/.del-mysql_anim-06.gif~d9cffaf35d9d4719: Delete: Docs/MySQL-logos/mysql_anim-06.gif BitKeeper/deleted/.del-mysql-compatible.jpg~56ecc684688a7382: Delete: Docs/MySQL-logos/mysql-compatible.jpg BitKeeper/deleted/.del-docbook-fixup.pl~46cf3bdef147084e: Delete: Docs/Support/docbook-fixup.pl BitKeeper/deleted/.del-docbook-prefix.pl~876c7d33c68c224a: Delete: Docs/Support/docbook-prefix.pl BitKeeper/deleted/.del-docbook-split~be931c3922898d0: Delete: Docs/Support/docbook-split BitKeeper/deleted/.del-make-docbook~ccac1eb717e92ac9: Delete: Docs/Support/make-docbook BitKeeper/deleted/.del-make-makefile~39fd454b487126e8: Delete: Docs/Support/make-makefile BitKeeper/deleted/.del-test-make-manual~5da458f958a424ec: Delete: Docs/Support/test-make-manual BitKeeper/deleted/.del-test-make-manual-de~33cad2886311b8a: Delete: Docs/Support/test-make-manual-de BitKeeper/deleted/.del-trivial-makeinfo-4.0c.patch~40d336454ecf98db: Delete: Docs/Support/trivial-makeinfo-4.0c.patch BitKeeper/deleted/.del-xwf~76b97805d9146b80: Delete: Docs/Support/xwf BitKeeper/deleted/.del-colspec-fix.pl~6c78d3332330b19e: Delete: Docs/Support/colspec-fix.pl Docs/generate-text-files.pl: Rename: Docs/Support/generate-text-files.pl -> Docs/generate-text-files.pl BitKeeper/deleted/.del-.cvsignore~250f630140b90042: Delete: Docs/Support/.cvsignore BitKeeper/deleted/.del-changelog-4.0.xml~8f56ee8a913e848b: Delete: Docs/changelog-4.0.xml BitKeeper/deleted/.del-changelog-4.1.xml~8aa496ebed09d868: Delete: Docs/changelog-4.1.xml BitKeeper/deleted/.del-changelog-5.0.xml~f4c50926ccdd7434: Delete: Docs/changelog-5.0.xml BitKeeper/deleted/.del-sp-implemented.txt~15f5c0033d848288: Delete: Docs/sp-implemented.txt mysql-test/std_data/cacert.pem: Rename: SSL/cacert.pem -> mysql-test/std_data/cacert.pem mysql-test/std_data/client-cert.pem: Rename: SSL/client-cert.pem -> mysql-test/std_data/client-cert.pem mysql-test/std_data/client-key.pem: Rename: SSL/client-key.pem -> mysql-test/std_data/client-key.pem mysql-test/std_data/server-cert.pem: Rename: SSL/server-cert.pem -> mysql-test/std_data/server-cert.pem mysql-test/std_data/server-key.pem: Rename: SSL/server-key.pem -> mysql-test/std_data/server-key.pem BitKeeper/etc/ignore: added client/mysql_upgrade Docs/Makefile.am: Move generate-text-files.pl up a level, since it is the only Support file Makefile.am: Remove tools and SSL directories client/Makefile.am: Remove mysqltestmanager clients configure.in: Remove old tools directory mysql-test/Makefile.am: Don't need to copy .pem files any more, they're now in std_data. scripts/make_binary_distribution.sh: Don't package up mysqltestmanager support-files/mysql.spec.sh: Don't package mysqltestmanager
This commit is contained in:
@@ -250,12 +250,8 @@ MASTER_MYPORT=9306
|
||||
SLAVE_RUNNING=0
|
||||
SLAVE_MYHOST=127.0.0.1
|
||||
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
||||
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
|
||||
NDBCLUSTER_PORT=9350
|
||||
NDBCLUSTER_PORT_SLAVE=9358
|
||||
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
|
||||
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
|
||||
MYSQL_MANAGER_USER=root
|
||||
|
||||
#
|
||||
# To make it easier for different devs to work on the same host,
|
||||
@@ -269,14 +265,12 @@ MYSQL_MANAGER_USER=root
|
||||
#
|
||||
if [ -n "$MTR_BUILD_THREAD" ] ; then
|
||||
MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 10 + 10000`
|
||||
MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2`
|
||||
SLAVE_MYPORT=`expr $MASTER_MYPORT + 3`
|
||||
NDBCLUSTER_PORT=`expr $MASTER_MYPORT + 6`
|
||||
NDBCLUSTER_PORT_SLAVE=`expr $MASTER_MYPORT + 7`
|
||||
|
||||
echo "Using MTR_BUILD_THREAD = $MTR_BUILD_THREAD"
|
||||
echo "Using MASTER_MYPORT = $MASTER_MYPORT"
|
||||
echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT"
|
||||
echo "Using SLAVE_MYPORT = $SLAVE_MYPORT"
|
||||
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
|
||||
echo "Using NDBCLUSTER_PORT_SLAVE = $NDBCLUSTER_PORT_SLAVE"
|
||||
@@ -361,7 +355,6 @@ while test $# -gt 0; do
|
||||
--user=*) DBUSER=`$ECHO "$1" | $SED -e "s;--user=;;"` ;;
|
||||
--force) FORCE=1 ;;
|
||||
--timer) USE_TIMER=1 ;;
|
||||
--verbose-manager) MANAGER_QUIET_OPT="" ;;
|
||||
--old-master) MASTER_40_ARGS="";;
|
||||
--master-binary=*)
|
||||
MASTER_MYSQLD=`$ECHO "$1" | $SED -e "s;--master-binary=;;"` ;;
|
||||
@@ -407,7 +400,6 @@ while test $# -gt 0; do
|
||||
LOCAL_MASTER=1 ;;
|
||||
--master_port=*) MASTER_MYPORT=`$ECHO "$1" | $SED -e "s;--master_port=;;"` ;;
|
||||
--slave_port=*) SLAVE_MYPORT=`$ECHO "$1" | $SED -e "s;--slave_port=;;"` ;;
|
||||
--manager-port=*) MYSQL_MANAGER_PORT=`$ECHO "$1" | $SED -e "s;--manager_port=;;"` ;;
|
||||
--ndbcluster_port=*) NDBCLUSTER_PORT=`$ECHO "$1" | $SED -e "s;--ndbcluster_port=;;"` ;;
|
||||
--ndbcluster-port=*) NDBCLUSTER_PORT=`$ECHO "$1" | $SED -e "s;--ndbcluster-port=;;"` ;;
|
||||
--ndbcluster-port-slave=*) NDBCLUSTER_PORT_SLAVE=`$ECHO "$1" | $SED -e "s;--ndbcluster-port-slave=;;"` ;;
|
||||
@@ -423,11 +415,6 @@ while test $# -gt 0; do
|
||||
MYSQL_TEST_SSL_OPTS="--ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem \
|
||||
--ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem \
|
||||
--ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem" ;;
|
||||
--no-manager | --skip-manager) USE_MANAGER=0 ;;
|
||||
--manager)
|
||||
USE_MANAGER=1
|
||||
USE_RUNNING_SERVER=0
|
||||
;;
|
||||
--start-and-exit)
|
||||
START_AND_EXIT=1
|
||||
;;
|
||||
@@ -645,7 +632,6 @@ fi
|
||||
#--
|
||||
|
||||
MYRUN_DIR=$MYSQL_TEST_DIR/var/run
|
||||
MANAGER_PID_FILE="$MYRUN_DIR/manager.pid"
|
||||
|
||||
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/master-data"
|
||||
MASTER_MYSOCK="$MYSQL_TMP_DIR/master.sock"
|
||||
@@ -759,9 +745,6 @@ if [ x$SOURCE_DIST = x1 ] ; then
|
||||
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
|
||||
WAIT_PID="$BASEDIR/extra/mysql_waitpid"
|
||||
MYSQL_MY_PRINT_DEFAULTS="$BASEDIR/extra/my_print_defaults"
|
||||
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqltestmanagerc"
|
||||
MYSQL_MANAGER="$BASEDIR/tools/mysqltestmanager"
|
||||
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqltestmanager-pwgen"
|
||||
MYSQL="$CLIENT_BINDIR/mysql"
|
||||
LANGUAGE="$BASEDIR/sql/share/english/"
|
||||
CHARSETSDIR="$BASEDIR/sql/share/charsets"
|
||||
@@ -822,9 +805,6 @@ else
|
||||
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
|
||||
WAIT_PID="$CLIENT_BINDIR/mysql_waitpid"
|
||||
MYSQL_MY_PRINT_DEFAULTS="$CLIENT_BINDIR/my_print_defaults"
|
||||
MYSQL_MANAGER="$CLIENT_BINDIR/mysqltestmanager"
|
||||
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqltestmanagerc"
|
||||
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqltestmanager-pwgen"
|
||||
MYSQL="$CLIENT_BINDIR/mysql"
|
||||
INSTALL_DB="./install_test_db --bin"
|
||||
MYSQL_FIX_SYSTEM_TABLES="$CLIENT_BINDIR/mysql_fix_privilege_tables"
|
||||
@@ -1214,96 +1194,27 @@ abort_if_failed()
|
||||
fi
|
||||
}
|
||||
|
||||
start_manager()
|
||||
launch_in_background()
|
||||
{
|
||||
if [ $USE_MANAGER = 0 ] ; then
|
||||
echo "Manager disabled, skipping manager start."
|
||||
$RM -f $MYSQL_MANAGER_LOG
|
||||
echo $@ | /bin/sh >> $CUR_MYERR 2>&1 &
|
||||
sleep 2 #hack
|
||||
return
|
||||
fi
|
||||
$ECHO "Starting MySQL Manager"
|
||||
if [ -f "$MANAGER_PID_FILE" ] ; then
|
||||
kill `cat $MANAGER_PID_FILE`
|
||||
sleep 1
|
||||
if [ -f "$MANAGER_PID_FILE" ] ; then
|
||||
kill -9 `cat $MANAGER_PID_FILE`
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
$RM -f $MANAGER_PID_FILE
|
||||
MYSQL_MANAGER_PW=`$MYSQL_MANAGER_PWGEN -u $MYSQL_MANAGER_USER \
|
||||
-o $MYSQL_MANAGER_PW_FILE`
|
||||
$MYSQL_MANAGER --log=$MYSQL_MANAGER_LOG --port=$MYSQL_MANAGER_PORT \
|
||||
--password-file=$MYSQL_MANAGER_PW_FILE --pid-file=$MANAGER_PID_FILE
|
||||
abort_if_failed "Could not start MySQL manager"
|
||||
mysqltest_manager_args="--manager-host=localhost \
|
||||
--manager-user=$MYSQL_MANAGER_USER \
|
||||
--manager-password=$MYSQL_MANAGER_PW \
|
||||
--manager-port=$MYSQL_MANAGER_PORT \
|
||||
--manager-wait-timeout=$START_WAIT_TIMEOUT"
|
||||
MYSQL_TEST="$MYSQL_TEST $mysqltest_manager_args"
|
||||
MYSQL_TEST_ARGS="$MYSQL_TEST_ARGS $mysqltest_manager_args"
|
||||
while [ ! -f $MANAGER_PID_FILE ] ; do
|
||||
sleep 1
|
||||
done
|
||||
echo "Manager started"
|
||||
}
|
||||
|
||||
stop_manager()
|
||||
{
|
||||
if [ $USE_MANAGER = 0 ] ; then
|
||||
return
|
||||
fi
|
||||
$MYSQL_MANAGER_CLIENT $MANAGER_QUIET_OPT -u$MYSQL_MANAGER_USER \
|
||||
-p$MYSQL_MANAGER_PW -P $MYSQL_MANAGER_PORT <<EOF
|
||||
shutdown
|
||||
EOF
|
||||
echo "Manager terminated"
|
||||
|
||||
}
|
||||
|
||||
manager_launch()
|
||||
{
|
||||
ident=$1
|
||||
shift
|
||||
if [ $USE_MANAGER = 0 ] ; then
|
||||
echo $@ | /bin/sh >> $CUR_MYERR 2>&1 &
|
||||
sleep 2 #hack
|
||||
return
|
||||
fi
|
||||
$MYSQL_MANAGER_CLIENT $MANAGER_QUIET_OPT --user=$MYSQL_MANAGER_USER \
|
||||
--password=$MYSQL_MANAGER_PW --port=$MYSQL_MANAGER_PORT <<EOF
|
||||
def_exec $ident "$@"
|
||||
set_exec_stdout $ident $CUR_MYERR
|
||||
set_exec_stderr $ident $CUR_MYERR
|
||||
set_exec_con $ident root localhost $CUR_MYSOCK
|
||||
start_exec $ident $START_WAIT_TIMEOUT
|
||||
EOF
|
||||
abort_if_failed "Could not execute manager command"
|
||||
}
|
||||
|
||||
manager_term()
|
||||
shutdown_mysqld()
|
||||
{
|
||||
pid=$1
|
||||
ident=$2
|
||||
if [ $USE_MANAGER = 0 ] ; then
|
||||
# Shutdown time must be high as slave may be in reconnect
|
||||
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock$3 --connect_timeout=5 --shutdown_timeout=70 shutdown >> $MYSQL_MANAGER_LOG 2>&1
|
||||
res=$?
|
||||
# Some systems require an extra connect
|
||||
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock$3 --connect_timeout=1 ping >> $MYSQL_MANAGER_LOG 2>&1
|
||||
if test $res = 0
|
||||
then
|
||||
wait_for_pid $pid
|
||||
fi
|
||||
return $res
|
||||
# Shutdown time must be high as slave may be in reconnect
|
||||
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock$3 --connect_timeout=5 --shutdown_timeout=70 shutdown >> $MYSQL_MANAGER_LOG 2>&1
|
||||
res=$?
|
||||
# Some systems require an extra connect
|
||||
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock$3 --connect_timeout=1 ping >> $MYSQL_MANAGER_LOG 2>&1
|
||||
if test $res = 0
|
||||
then
|
||||
wait_for_pid $pid
|
||||
fi
|
||||
$MYSQL_MANAGER_CLIENT $MANAGER_QUIET_OPT --user=$MYSQL_MANAGER_USER \
|
||||
--password=$MYSQL_MANAGER_PW --port=$MYSQL_MANAGER_PORT <<EOF
|
||||
stop_exec $ident $STOP_WAIT_TIMEOUT
|
||||
EOF
|
||||
abort_if_failed "Could not execute manager command"
|
||||
return $res
|
||||
}
|
||||
|
||||
start_ndbcluster()
|
||||
@@ -1486,7 +1397,7 @@ start_master()
|
||||
if [ x$DO_DDD = x1 ]
|
||||
then
|
||||
$ECHO "set args $master_args" > $GDB_MASTER_INIT$1
|
||||
manager_launch master ddd -display $DISPLAY --debugger \
|
||||
launch_in_background master ddd -display $DISPLAY --debugger \
|
||||
"gdb -x $GDB_MASTER_INIT$1" $MASTER_MYSQLD
|
||||
elif [ x$DO_GDB = x1 ]
|
||||
then
|
||||
@@ -1507,11 +1418,11 @@ end
|
||||
r
|
||||
EOF
|
||||
fi ) > $GDB_MASTER_INIT$1
|
||||
manager_launch master $XTERM -display $DISPLAY \
|
||||
launch_in_background master $XTERM -display $DISPLAY \
|
||||
-title "Master" -e gdb -x $GDB_MASTER_INIT$1 $MASTER_MYSQLD
|
||||
fi
|
||||
else
|
||||
manager_launch master $MASTER_MYSQLD $master_args
|
||||
launch_in_background master $MASTER_MYSQLD $master_args
|
||||
fi
|
||||
sleep_until_file_created $MASTER_MYPID$1 $wait_for_master
|
||||
wait_for_master=$SLEEP_TIME_FOR_SECOND_MASTER
|
||||
@@ -1644,7 +1555,7 @@ start_slave()
|
||||
if [ x$DO_DDD = x1 ]
|
||||
then
|
||||
$ECHO "set args $slave_args" > $GDB_SLAVE_INIT
|
||||
manager_launch $slave_ident ddd -display $DISPLAY --debugger \
|
||||
launch_in_background $slave_ident ddd -display $DISPLAY --debugger \
|
||||
"gdb -x $GDB_SLAVE_INIT" $SLAVE_MYSQLD
|
||||
elif [ x$DO_GDB = x1 ]
|
||||
then
|
||||
@@ -1665,11 +1576,11 @@ end
|
||||
r
|
||||
EOF
|
||||
fi ) > $GDB_SLAVE_INIT
|
||||
manager_launch $slave_ident $XTERM -display $DISPLAY -title "Slave" -e \
|
||||
launch_in_background $slave_ident $XTERM -display $DISPLAY -title "Slave" -e \
|
||||
gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD
|
||||
fi
|
||||
else
|
||||
manager_launch $slave_ident $SLAVE_MYSQLD $slave_args
|
||||
launch_in_background $slave_ident $SLAVE_MYSQLD $slave_args
|
||||
fi
|
||||
eval "SLAVE$1_RUNNING=1"
|
||||
sleep_until_file_created $slave_pid $wait_for_slave
|
||||
@@ -1701,7 +1612,7 @@ stop_slave ()
|
||||
if [ x$this_slave_running = x1 ]
|
||||
then
|
||||
pid=`$CAT $slave_pid`
|
||||
manager_term $pid $slave_ident
|
||||
shutdown_mysqld $pid $slave_ident
|
||||
if [ $? != 0 ] && [ -f $slave_pid ]
|
||||
then # try harder!
|
||||
$ECHO "slave not cooperating with mysqladmin, will try manual kill"
|
||||
@@ -1748,7 +1659,7 @@ stop_master ()
|
||||
# MASTER_RUNNING=0 to get cleanup when calling start_master().
|
||||
if [ x$USE_EMBEDDED_SERVER != x1 ] ; then
|
||||
pid=`$CAT $MASTER_MYPID$1`
|
||||
manager_term $pid master $1
|
||||
shutdown_mysqld $pid master $1
|
||||
if [ $? != 0 ] && [ -f $MASTER_MYPID$1 ]
|
||||
then # try harder!
|
||||
$ECHO "master not cooperating with mysqladmin, will try manual kill"
|
||||
@@ -2074,7 +1985,6 @@ run_testcase ()
|
||||
[ -z "$DO_DDD" ] && [ -z "$USE_EMBEDDED_SERVER" ]
|
||||
then
|
||||
mysql_stop
|
||||
stop_manager
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@@ -2244,18 +2154,6 @@ then
|
||||
rm $MASTER_MYPID $MASTER_MYPID"1" $SLAVE_MYPID
|
||||
fi
|
||||
|
||||
# Kill any running managers
|
||||
if [ -f "$MANAGER_PID_FILE" ]
|
||||
then
|
||||
kill `cat $MANAGER_PID_FILE`
|
||||
sleep 1
|
||||
if [ -f "$MANAGER_PID_FILE" ]
|
||||
then
|
||||
kill -9 `cat $MANAGER_PID_FILE`
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# just to force stopping anything from previous runs
|
||||
USE_NDBCLUSTER_OPT=$USE_NDBCLUSTER
|
||||
stop_ndbcluster
|
||||
@@ -2279,10 +2177,8 @@ then
|
||||
USE_NDBCLUSTER_OPT=
|
||||
fi
|
||||
|
||||
start_manager
|
||||
|
||||
# Do not automagically start daemons if we are in gdb or running only one test
|
||||
# case
|
||||
# Do not automagically start daemons if we are in gdb or running only one
|
||||
# test case
|
||||
if [ -z "$DO_GDB" ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_start
|
||||
@@ -2329,7 +2225,6 @@ then
|
||||
fi
|
||||
cd $savedir
|
||||
mysql_stop
|
||||
stop_manager
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -2351,7 +2246,6 @@ then
|
||||
|
||||
if [ $USE_RUNNING_SERVER -eq 0 ] ; then
|
||||
mysql_stop
|
||||
stop_manager
|
||||
fi
|
||||
|
||||
exit
|
||||
@@ -2398,7 +2292,6 @@ if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && [ -z "$DO_DDD" ]
|
||||
then
|
||||
mysql_stop
|
||||
fi
|
||||
stop_manager
|
||||
report_stats
|
||||
$ECHO
|
||||
|
||||
|
Reference in New Issue
Block a user