Changeset: bff1f6573765 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bff1f6573765
Modified Files:
        sql/src/test/test.sh
        sql/src/test/test.sh2
Branch: Oct2010
Log Message:

Merge heads.


diffs (145 lines):

diff -r 90581b2d5413 -r bff1f6573765 sql/src/test/concurrent-stress.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/concurrent-stress.sh Wed Oct 27 12:54:42 2010 +0200
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+
+# The contents of this file are subject to the MonetDB Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the MonetDB Database System.
+#
+# The Initial Developer of the Original Code is CWI.
+# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+# Copyright August 2008-2010 MonetDB B.V.
+# All Rights Reserved.
+
+# Run mclient with a variable number of concurrent connections for
+# simple SELECT 1; queries.  Disconnect after each query.  Continue as
+# long as the server can cope.
+# This script intends to simulate a scenario as reported in bug #2700
+
+do_usage() {
+       echo "usage: concurrent_stress.sh <concurrency> [database [host 
[port]]]" 
+       exit 1
+}
+
+[[ -z $1 ]] && do_usage
+
+CONCURRENCY=$1
+shift
+for v in MDATABASE:d MHOST:h MPORT:p ; do
+       [[ -z $1 ]] && break
+       eval ${v%:*}="-${v#*:}$1"
+       shift
+done
+
+if ! type -P mclient > /dev/null ; then
+       echo "cannot find mclient in PATH!" > /dev/stderr
+       exit 1
+fi
+
+echo "invoking $CONCURRENCY runners using the command:"
+echo "  mclient $MDATABASE $MHOST $MPORT -ftab -s \"SELECT 1;\""
+
+concurrent_runner() {
+       local num=$1
+       local cnt=1
+       while mclient $MDATABASE $MHOST $MPORT -ftab -s "SELECT 1;" > /dev/null 
; do
+               : $((cnt++))
+       done
+       echo "mclient $num terminated in query $cnt"
+}
+
+for nr in $(seq 1 $CONCURRENCY) ; do
+       concurrent_runner $nr &
+done
+wait
diff -r 90581b2d5413 -r bff1f6573765 sql/src/test/run.all
--- a/sql/src/test/run.all      Wed Oct 27 12:53:29 2010 +0200
+++ b/sql/src/test/run.all      Wed Oct 27 12:54:42 2010 +0200
@@ -18,7 +18,6 @@
 # All Rights Reserved.
 
 SQL='mclient -lsql -umonetdb -Pmonetdb'
-SQL1='mclient -lsql -uromulo -Promulo'
 if [ $# -eq 1 ]; then
        SQL=$1
 fi
@@ -69,5 +68,5 @@
 
 echo "internStmt"
 $SQL < internStmt_1.sql
-$SQL1 < internStmt_2.sql
+$SQL < internStmt_2.sql
 $SQL < internStmt_3.sql
diff -r 90581b2d5413 -r bff1f6573765 sql/src/test/test.sh
--- a/sql/src/test/test.sh      Wed Oct 27 12:53:29 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# The contents of this file are subject to the MonetDB Public License
-# Version 1.1 (the "License"); you may not use this file except in
-# compliance with the License. You may obtain a copy of the License at
-# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-# License for the specific language governing rights and limitations
-# under the License.
-#
-# The Original Code is the MonetDB Database System.
-#
-# The Initial Developer of the Original Code is CWI.
-# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-# Copyright August 2008-2010 MonetDB B.V.
-# All Rights Reserved.
-
-PWD=`pwd`
-
-rm -rf /ufs/niels/data/dbfarm/sql 
-Mcreatedb -db sql
-Mserver -db sql ../parser/catalog.mil ../parser/sql.mil <<EOF
-sql( "$PWD/as3ap.sql", "-", 1);
-quit;
-EOF
diff -r 90581b2d5413 -r bff1f6573765 sql/src/test/test.sh2
--- a/sql/src/test/test.sh2     Wed Oct 27 12:53:29 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# The contents of this file are subject to the MonetDB Public License
-# Version 1.1 (the "License"); you may not use this file except in
-# compliance with the License. You may obtain a copy of the License at
-# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-# License for the specific language governing rights and limitations
-# under the License.
-#
-# The Original Code is the MonetDB Database System.
-#
-# The Initial Developer of the Original Code is CWI.
-# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-# Copyright August 2008-2010 MonetDB B.V.
-# All Rights Reserved.
-
-mclient <<EOF
-module(io);
-quit;
-EOF
-
-mclient <<EOF
-module(io);
-quit;
-EOF
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to