*** empty log message ***
[csql.git] / test / cache / CacheTable / test004.ksh
blob9755d8b3c58dab5721ef523c0af13b44691b410e
1 #!/bin/sh
2 # Test Case
4 # 4.create table, insert some records into the table and then load with no definition option. should fail.
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
19 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/csqlinputwithrec.sql > /dev/null 2>&1
20 if [ $? -ne 0 ]
21 then
22 cp /tmp/csql.conf $CSQL_CONFIG_FILE
23 exit 1;
26 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
27 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
29 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -s >/dev/null 2>&1
30 if [ $? -eq 0 ]
31 then
32 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
33 isql $DSN < ${REL_PATH}/drop.sql >/dev/null 2>&1
34 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
35 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
36 cp /tmp/csql.conf $CSQL_CONFIG_FILE
37 exit 2;
40 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
41 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
42 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
43 isql $DSN < ${REL_PATH}/drop.sql >/dev/null 2>&1
45 cp /tmp/csql.conf $CSQL_CONFIG_FILE
46 exit 0;