2 #insert, select, update, delete on table which is not there in both mysql and csql. All should fail.
3 #Run this test only under csql/test or on this directory.
4 #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 echo CSQL_SQL_SERVER
=true
>>/tmp
/csql.conf
17 echo PORT
=6006 >>/tmp
/csql.conf
18 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
19 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
20 DS
="$DSN $DBUSER $PASSWORD"
21 rm -f /tmp
/csql
/csqlds.conf
22 touch /tmp
/csql
/csqlds.conf
23 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
29 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
33 if [ $DSN = "oracle" ]
35 for a
in 51 52 53 54 55
37 echo "insert into t1 values($a,'KKK');"
38 done >> $REL_PATH/oracsqlinputt1.sql
39 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/oracsqlinputt1.sql
>/dev
/null
2>&1
43 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/csqldb2inputtest1.sql
>/dev
/null
2>&1
45 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/csqlinputtest1.sql
>/dev
/null
2>&1
48 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/selectstar.sql
49 isql
$DS < $REL_PATH/selectstar.sql
52 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
55 if [ $DSN = "oracle" ]
57 echo "select * from t1 where f1 in(10,30,50,54);" >> $REL_PATH/oraselect.sql
58 echo "select * from t1 where f1 between 20 and 54;" >> $REL_PATH/oraselect.sql
59 echo "update t1 set f2='LLL' where f1=20;" >> $REL_PATH/oraupdate.sql
60 echo "delete from t1 where f2='BBB';" >> $REL_PATH/oradelete.sql
61 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/oraselect.sql
>/dev
/null
2>&1
62 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/oraupdate.sql
>/dev
/null
2>&1
63 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/oradelete.sql
>/dev
/null
2>&1
64 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/selectstar.sql
>/dev
/null
2>&1
66 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/select.sql
2>/dev
/null
69 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/db2update.sql
2>/dev
/null
71 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/update.sql
2>/dev
/null
73 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/delete.sql
2>/dev
/null
74 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6006 -g -s $REL_PATH/selectstar.sql
2>/dev
/null
77 isql
$DS < $REL_PATH/selectstar.sql
2>/dev
/null
80 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
84 isql
$DS < $REL_PATH/dropt1t2t3.sql
> /dev
/null
2>&1
87 kill `ps -el | grep csqlsqlserver | gawk -F" " '{ print $4 }'`
88 rm -f $REL_PATH/ora
*.sql