adding DSN to csql.conf based on the cache test mode
[csql.git] / test / cache / Recovery / test001.ksh
blobc842dee0871cdf796c23d9e42a7824538f9c57f1
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 echo DSN=$DSN >> $CSQL_CONFIG_FILE
15 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
16 isql $DSN < $REL_PATH/createt1.sql > /dev/null 2>&1
18 rm -f /tmp/csql/csqltable.conf
19 touch /tmp/csql/csqltable.conf
20 echo "1:t1 NULL NULL NULL" > /tmp/csql/csqltable.conf
22 mv ~/.odbc.ini /tmp
24 touch ~/.odbc.ini
26 $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 &
27 sleep 3
28 if [ $? -ne 0 ]
29 then
30 mv /tmp/.odbc.ini ~
31 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
32 exit 1;
35 mv /tmp/.odbc.ini ~
36 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1
38 exit 0;