separating database engine and cache tests
[csql.git] / test / cache / Gateway / test011.ksh
blob8a17a4bd97e7b14147962320bd705b905c49588f
1 #!/bin/sh
3 # 11.Table there in csql and mysql and not cached. select should return records in csql table.
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/mysqlinputtest1.sql > /dev/null 2>&1
17 isql $DSN < $REL_PATH/selectstar.sql
18 $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
19 pid=$!
20 sleep 5
21 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/csqlinputtest10.sql >/dev/null 2>&1
22 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstar.sql
23 isql $DSN < $REL_PATH/dropall.sql > /dev/null 2>&1
24 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
25 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
26 kill -9 $pid
27 ipcrm -M 1199 -M 2277
28 exit 0;