adding DSN to csql.conf based on the cache test mode
[csql.git] / test / cache / CacheTable / test007.ksh
blob637c841f4abe92ff7b1893107eeb1e783a503c59
1 #!/bin/sh
2 # Test Case
4 # 7.Do not create table, load with no definition option. should fail.i
6 #Run this test only under csql/test or on this directory.
7 #Otherwise, it may fail
9 input=${PWD}/cache/CacheTable/inputtest4.sql
10 REL_PATH=.
11 if [ -s "$input" ]
12 then
13 REL_PATH=${PWD}/cache/CacheTable
16 cp $CSQL_CONFIG_FILE /tmp/csql.conf
17 echo DSN=$DSN >>$CSQL_CONFIG_FILE
18 isql $DSN < ${REL_PATH}/inputtest4.sql >/dev/null 2>&1
20 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
21 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
23 ret=1
24 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -s > /dev/null 2>&1
25 if [ $? -ne 0 ]
26 then
27 ret=0;
29 isql $DSN < ${REL_PATH}/drop.sql >/dev/null 2>&1
30 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
31 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
32 cp /tmp/csql.conf $CSQL_CONFIG_FILE
33 exit $ret;