some of the failing tests kill the test executor. so reverting back signal to SIGKILL
[csql.git] / test / cache / Recovery / test002.ksh
blobad6ac4ba5d4e0b46eecbe4fbb41731d50420931d
1 #!/bin/sh
3 #Run this test only under csql/test or on this directory.
4 #Otherwise, it may fail
5 CSQL_CONF=${PWD}/cache/Recovery/csql.conf
6 input=${PWD}/cache/Recovery/create.sql
7 REL_PATH=.
8 if [ -s "$input" -a -s "$CSQL_CONF" ]
9 then
10 REL_PATH=${PWD}/cache/Recovery
12 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
14 isql myodbc3 < $REL_PATH/create.sql > /dev/null 2>&1
16 if [ $? -ne 0 ]
17 then
18 exit 1;
21 # edit /tmp/csql/csqltable.conf
22 rm -f /tmp/csql/csqltable.conf
23 if [ $? -ne 0 ]
24 then
25 exit 2;
27 touch /tmp/csql/csqltable.conf
28 if [ $? -ne 0 ]
29 then
30 exit 3;
32 for (( a=1; a<101; a++ ))
34 echo "1:t$a"
35 done >> /tmp/csql/csqltable.conf
37 $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 &
38 if [ $? -ne 0 ]
39 then
40 exit 4;
42 pid=$!
43 sleep 5
46 $CSQL_INSTALL_ROOT/bin/csqldump
48 if [ $? -ne 0 ]
49 then
50 exit 5;
53 kill -9 $pid > /dev/null 2>&1
54 if [ $? -ne 0 ]
55 then
56 exit 6;
59 isql myodbc3 < $REL_PATH/dropall.sql > /dev/null 2>&1
60 if [ $? -ne 0 ]
61 then
62 exit 7;
65 exit 0;