separating database engine and cache tests
[csql.git] / test / cache / Gateway / test006.ksh
blob12ea9df79e644c44936b353768c1bae36b1bd9ff
1 #!/bin/sh
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 CSQL_CONF=${PWD}/cache/Gateway/csql.conf
8 input=${PWD}/cache/Gateway/mysqlinputtest1.sql
9 REL_PATH=.
10 if [ -s "$input" -a -s "$CSQL_CONF" ]
11 then
12 REL_PATH=${PWD}/cache/Gateway
14 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
16 isql $DSN < $REL_PATH/mysqlinputtest5.sql > /dev/null 2>&1
18 # edit /tmp/csql/csqltable.conf
20 $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
21 pid=$!
22 sleep 5
24 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstar.sql
25 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/complex.sql
27 isql $DSN < $REL_PATH/dropall.sql > /dev/null 2>&1
28 kill -9 $pid
29 ipcrm -M 1199 -M 2277
30 exit 0;