3 # 6. Non cached table there in csql and mysql. run complex query (avg on some field). It should get the correct value from mysql.
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
14 cp $REL_PATH/csql.conf
/tmp
/csql.conf
15 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
17 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
18 DS
="$DSN $DBUSER $PASSWORD"
19 rm -f /tmp
/csql
/csqlds.conf
20 touch /tmp
/csql
/csqlds.conf
21 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
27 if [ $DSN = "oracle" ]
29 isql
$DS < $REL_PATH/orainputt1.oracle
>/dev
/null
2>&1
30 elif [ $DSN = "sybase" ]
32 isql
$DS < $REL_PATH/sybaseinputtest5.sql
> /dev
/null
2>&1
35 isql
$DS < $REL_PATH/db2inputtest5.sql
> /dev
/null
2>&1
37 isql
$DS < $REL_PATH/mysqlinputtest5.sql
> /dev
/null
2>&1
42 echo "DSN is not set for target db"
46 # edit /tmp/csql/csqltable.conf
48 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
52 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/selectstar.sql
54 if [ $DSN = "oracle" ]
56 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/complex.oracle
57 elif [ $DSN = "sybase" -o $DSN = "db2" ]
59 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/complex.sybase
61 $CSQL_INSTALL_ROOT/bin
/csql
-g -s $REL_PATH/complex.sql
64 isql
$DS < $REL_PATH/dropt1t2t3.sql
> /dev
/null
2>&1