Fixing failed test
[csql.git] / test / cache / Recovery / test001.ksh
blob34cb143f0cacb66642b1f0f6c7b8e3767855ad5f
1 #!/bin/sh
3 #Run this test only under csql/test or on this directory.
4 #Otherwise, it may fail
6 CSQL_CONF=${PWD}/cache/Recovery/csql.conf
7 REL_PATH=.
8 if [ -s "$CSQL_CONF" ]
9 then
10 REL_PATH=${PWD}/cache/Recovery
12 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
13 cp $CSQL_CONFIG_FILE /tmp
14 echo DSN=$DSN >> $CSQL_CONFIG_FILE
16 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
17 isql $DSN < $REL_PATH/createt1.sql > /dev/null 2>&1
19 rm -f /tmp/csql/csqltable.conf
20 touch /tmp/csql/csqltable.conf
21 echo "1:t1 NULL NULL NULL" > /tmp/csql/csqltable.conf
23 mv ~/.odbc.ini /tmp
25 touch ~/.odbc.ini
27 $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 &
28 sleep 3
29 if [ $? -ne 0 ]
30 then
31 mv /tmp/.odbc.ini ~
32 mv /tmp/csql.conf $CSQL_CONFIG_FILE
33 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
34 exit 1;
36 ipcrm -M 1199
37 ipcrm -M 2277
38 mv /tmp/csql.conf $CSQL_CONFIG_FILE
39 mv /tmp/.odbc.ini ~
40 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
42 exit 0;