diff options
author | unknown <joreland@mysql.com> | 2005-06-13 09:12:51 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-06-13 09:12:51 +0200 |
commit | 53a92c875baef5a3242a795c96c41196f32c0a2f (patch) | |
tree | c54845b88c66b4dfe061ca6dd3b36d2048b027f0 /ndb/test | |
parent | da4838a0f8026f701c6e16eb0af3816403f3da1a (diff) | |
parent | 861cecf3f54475a8407c7592bb249ccc655516be (diff) | |
download | mariadb-git-53a92c875baef5a3242a795c96c41196f32c0a2f.tar.gz |
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-push
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testBlobs.cpp | 10 | ||||
-rwxr-xr-x | ndb/test/run-test/make-config.sh | 34 | ||||
-rwxr-xr-x | ndb/test/run-test/ndb-autotest.sh | 17 |
3 files changed, 31 insertions, 30 deletions
diff --git a/ndb/test/ndbapi/testBlobs.cpp b/ndb/test/ndbapi/testBlobs.cpp index 7b30777456f..a4e7a53a5d1 100644 --- a/ndb/test/ndbapi/testBlobs.cpp +++ b/ndb/test/ndbapi/testBlobs.cpp @@ -1547,11 +1547,11 @@ testperf() } if (n != 0) { CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); g_con = 0; n = 0; } g_bh1 = 0; g_opr = 0; - g_con = 0; } // pk read char (one trans) { @@ -1575,7 +1575,7 @@ testperf() t1.off(g_opt.m_rowsperf); DBG(t1.time()); g_opr = 0; - g_con = 0; + g_ndb->closeTransaction(g_con); g_con = 0; } // pk read text (one trans) { @@ -1600,7 +1600,7 @@ testperf() CHK(g_con->execute(Commit) == 0); t2.off(g_opt.m_rowsperf); DBG(t2.time()); - g_opr = 0; + g_ndb->closeTransaction(g_con); g_opr = 0; g_con = 0; } // pk read overhead @@ -1634,7 +1634,7 @@ testperf() CHK(n == g_opt.m_rowsperf); t1.off(g_opt.m_rowsperf); DBG(t1.time()); - g_ops = 0; + g_ndb->closeTransaction(g_con); g_ops = 0; g_con = 0; } // scan read text @@ -1668,7 +1668,7 @@ testperf() DBG(t2.time()); g_bh1 = 0; g_ops = 0; - g_con = 0; + g_ndb->closeTransaction(g_con); g_con = 0; } // scan read overhead DBG("scan read overhead: " << t2.over(t1)); diff --git a/ndb/test/run-test/make-config.sh b/ndb/test/run-test/make-config.sh index 1321ce4e9f0..e82acb8a7dd 100755 --- a/ndb/test/run-test/make-config.sh +++ b/ndb/test/run-test/make-config.sh @@ -20,40 +20,40 @@ add_procs(){ } add_proc (){ - dir="" - conf="" case $type in mgm) - dir="ndb_mgmd" - conf="[ndb_mgmd]\nId: $node_id\nHostName: $2\n" + echo "$proc_no.ndb_mgmd" >> $dir_file + echo "[ndb_mgmd]" >> $config_file + echo "Id: $node_id" >> $config_file + echo "HostName: $2" >> $config_file node_id=`expr $node_id + 1` ;; api) - dir="ndb_api" - conf="[api]\nId: $node_id\nHostName: $2\n" + echo "$proc_no.ndb_api" >> $dir_file + echo "[api]" >> $config_file + echo "Id: $node_id" >> $config_file + echo "HostName: $2" >> $config_file node_id=`expr $node_id + 1` ;; ndb) - dir="ndbd" - conf="[ndbd]\nId: $node_id\nHostName: $2\n" + echo "$proc_no.ndbd" >> $dir_file + echo "[ndbd]" >> $config_file + echo "Id: $node_id" >> $config_file + echo "HostName: $2" >> $config_file node_id=`expr $node_id + 1` ;; mysqld) - dir="mysqld" - conf="[mysqld]\nId: $node_id\nHostName: $2\n" + echo "$proc_no.mysqld" >> $dir_file + echo "[ndb_mgmd]" >> $config_file + echo "Id: $node_id" >> $config_file + echo "HostName: $2" >> $config_file node_id=`expr $node_id + 1` ;; mysql) - dir="mysql" + echo "$proc_no.mysql" >> $dir_file ;; esac - dir="$proc_no.$dir" proc_no=`expr $proc_no + 1` - echo -e $dir >> $dir_file - if [ "$conf" ] - then - echo -e $conf >> $config_file - fi } diff --git a/ndb/test/run-test/ndb-autotest.sh b/ndb/test/run-test/ndb-autotest.sh index 09087a8a8c7..573a9953924 100755 --- a/ndb/test/run-test/ndb-autotest.sh +++ b/ndb/test/run-test/ndb-autotest.sh @@ -66,7 +66,7 @@ done if [ -f $conf ] then - . $conf + . ./$conf else echo "Can't find config file: $conf" exit @@ -131,8 +131,10 @@ echo "$DATE $RUN" > $LOCK # trap them, and remove the # # Lock file before exit # ############################# - -trap "rm -f $LOCK" ERR +if [ `uname -s` != "SunOS" ] +then + trap "rm -f $LOCK" ERR +fi # You can add more to this path# ################################ @@ -191,7 +193,7 @@ then else echo $VERSION > /tmp/version.$$ fi -match=`grep -c "$VERSION" /tmp/version.$$` +match=`grep -c "$VERSION" /tmp/version.$$ | xargs echo` rm -f /tmp/version.$$ if [ $match -eq 0 ] then @@ -229,7 +231,7 @@ filter(){ shift while [ $# -gt 0 ] do - if [ `grep -c $1 $neg` -eq 0 ] ; then echo $1; fi + if [ `grep -c $1 $neg | xargs echo` -eq 0 ] ; then echo $1; fi shift done } @@ -294,13 +296,12 @@ choose_conf(){ if [ -f $test_dir/conf-$1-$HOST.txt ] then echo "$test_dir/conf-$1-$HOST.txt" - echo "$test_dir/conf-$1-$host.txt" elif [ -f $test_dir/conf-$1.txt ] then echo "$test_dir/conf-$1.txt" else echo "Unable to find conf file looked for" 1>&2 - echo "$testdir/conf-$1-host.txt and" 1>&2 + echo "$testdir/conf-$1-$HOST.txt and" 1>&2 echo "$testdir/conf-$1.txt" 1>&2 exit fi @@ -343,7 +344,7 @@ start(){ count_hosts(){ cnt=`grep "CHOOSE_host" $1 | awk '{for(i=1; i<=NF;i++) \ - if(match($i, "CHOOSE_host") > 0) print $i;}' | sort | uniq | wc -l` + if(index($i, "CHOOSE_host") > 0) print $i;}' | sort | uniq | wc -l` echo $cnt } ####################################################### |