3 # 12.csqlserver not running
5 # noncached table in mysql(should work), cached table (work), csql table (fail)
7 #Run this test only under csql/test or on this directory.
8 #Otherwise, it may fail
9 input
=${PWD}/cache
/Gateway
/mysqlinputtest1.sql
13 REL_PATH
=${PWD}/cache
/Gateway
17 cp $REL_PATH/csql.conf
/tmp
/csql.conf
18 echo CSQL_SQL_SERVER
=true
>>/tmp
/csql.conf
19 echo PORT
=6024 >>/tmp
/csql.conf
20 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
22 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
23 DS
="$DSN $DBUSER $PASSWORD"
24 rm -f /tmp
/csql
/csqlds.conf
25 touch /tmp
/csql
/csqlds.conf
26 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
32 if [ $DSN = "oracle" ]
34 isql
$DS < $REL_PATH/orainputt1.oracle
>/dev
/null
2>&1
35 elif [ $DSN = "sybase" ]
37 isql
$DS < $REL_PATH/sybaseinputtest1.sql
>/dev
/null
2>&1
40 isql
$DS < $REL_PATH/db2inputtest1.sql
>/dev
/null
2>&1
42 isql
$DS < $REL_PATH/mysqlinputtest1.sql
> /dev
/null
2>&1
47 echo "DSN is not set for target db"
51 if [ $DSN = "oracle" ]
53 isql
$DS < $REL_PATH/orainputt2.oracle
> /dev
/null
2>&1
55 isql
$DS < $REL_PATH/mysqlinputtest12.sql
> /dev
/null
2>&1
57 # edit /tmp/csql/csqltable.conf
58 rm -f /tmp
/csql
/csqltable.conf
59 touch /tmp
/csql
/csqltable.conf
61 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
65 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-d $DSN
73 if [ $DSN = "oracle" ]
75 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/orainputt3.oracle
>/dev
/null
2>&1
77 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/csqlinputtest12.sql
>/dev
/null
2>&1
83 if [ $DSN = "oracle" ]
85 echo "update t2 set f2='LLL' where f1=20;" >> $REL_PATH/oraupdatet2.sql
86 echo "update t1 set f2='LLL' where f1=20;" >> $REL_PATH/oraupdatet1.sql
87 echo "update t3 set f2='LLL' where f1=20;" >> $REL_PATH/oraupdatet3.sql
88 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/oraupdatet2.sql
89 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/oraupdatet1.sql
90 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/oraupdatet3.sql
91 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstart2.sql
92 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstar.sql
93 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstart3.sql
97 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/db2updatet2.sql
98 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/db2update.sql
99 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/db2updatet3.sql
101 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/updatet2.sql
102 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/update.sql
103 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/updatet3.sql
105 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstart2.sql
106 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstar.sql
107 $CSQL_INSTALL_ROOT/bin
/csql
-H localhost
-P 6024 -g -s $REL_PATH/selectstart3.sql
110 isql
$DS < $REL_PATH/dropt1t2t3.sql
> /dev
/null
2>&1
112 rm -f /tmp
/csql
/csqltable.conf
113 rm -f $REL_PATH/ora
*.sql
114 touch /tmp
/csql
/csqltable.conf
115 kill `ps -el | grep csqlsqlserver | gawk -F" " '{ print $4 }'`