3 # 7. Cache table in csql from target database. Run any syntactically wrong query. There should be error reported both by csql and gateway.
5 #Run this test only under csql/test or on this directory.
6 #Otherwise, it may fail
7 input
=${PWD}/cache
/Gateway
/mysqlinputtest1.sql
11 REL_PATH
=${PWD}/cache
/Gateway
15 cp $REL_PATH/csql.conf
/tmp
/csql.conf
16 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
18 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
19 DS
="$DSN $DBUSER $PASSWORD"
20 rm -f /tmp
/csql
/csqlds.conf
21 touch /tmp
/csql
/csqlds.conf
22 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
28 if [ $DSN = "oracle" ]
30 isql
$DS < $REL_PATH/orainputt1.oracle
> /dev
/null
2>&1
31 elif [ $DSN = "sybase" ]
33 isql
$DS < $REL_PATH/sybaseinputtest5.sql
> /dev
/null
2>&1
36 isql
$DS < $REL_PATH/db2inputtest5.sql
> /dev
/null
2>&1
38 isql
$DS < $REL_PATH/mysqlinputtest5.sql
> /dev
/null
2>&1
43 echo "DSN is not set for target db"
47 # edit /tmp/csql/csqltable.conf
48 rm -f /tmp
/csql
/csqltable.conf
49 touch /tmp
/csql
/csqltable.conf
51 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
55 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-d $DSN
63 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/selectstar.sql
64 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/syntaxerr.sql
66 isql
$DS < $REL_PATH/dropt1t2.sql
> /dev
/null
2>&1
69 rm -f /tmp
/csql
/csqltable.conf
70 touch /tmp
/csql
/csqltable.conf