summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-11-17 17:23:46 -0700
committersasha@mysql.sashanet.com <>2001-11-17 17:23:46 -0700
commit586e812452402de452b47751ec8b3121cb002e8f (patch)
treec21577a3e1e1590e9241dd9b406c046d31a17123 /mysql-test
parentf89418b4e56de1d971838390a38f294805b1ac13 (diff)
downloadmariadb-git-586e812452402de452b47751ec8b3121cb002e8f.tar.gz
use env vars for socket/port in connect in mysqltest
--local-master option in mysql-test-run do not log CREATE TABLE when doing table dump fix replication to slave off 3.23 master
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/master-slave.inc8
-rw-r--r--mysql-test/mysql-test-run.sh9
2 files changed, 12 insertions, 5 deletions
diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc
index 3cb802fe6d9..23392690239 100644
--- a/mysql-test/include/master-slave.inc
+++ b/mysql-test/include/master-slave.inc
@@ -1,7 +1,7 @@
-connect (master,localhost,root,,test,0,master.sock);
-connect (master1,localhost,root,,test,0,master.sock);
-connect (slave,localhost,root,,test,0,slave.sock);
-connect (slave1,localhost,root,,test,0,slave.sock);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
+connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
connection slave;
--error 0,1199
!slave stop;
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index ed7414effd7..9622e1d95dc 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -151,6 +151,11 @@ while test $# -gt 0; do
--verbose-manager) MANAGER_QUIET_OPT="" ;;
--local) USE_RUNNING_SERVER="" ;;
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
+ --local-master)
+ MASTER_MYPORT=3306;
+ EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT --host=127.0.0.1 \
+ --port=$MYSQL_MYPORT"
+ 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=;;"` ;;
@@ -639,7 +644,9 @@ EOF
start_master()
{
- [ x$MASTER_RUNNING = 1 ] && return
+ if [ x$MASTER_RUNNING = x1 ] || [ x$LOCAL_MASTER = x1 ] ; then
+ return
+ fi
# Remove old berkeley db log files that can confuse the server
$RM -f $MASTER_MYDDIR/log.*
# Remove stale binary logs