separating database engine and cache tests
[csql.git] / test / cache / Gateway / test009.ksh
blobfeb38bdb80753ba28ffc2b8e9fcffad2ec901e81
1 #!/bin/sh
3 # 9.Cached table there in csql, but join with another noncached table in MySQL. 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
17 isql $DSN < $REL_PATH/mysqlinputtest8.sql > /dev/null 2>&1
19 # edit /tmp/csql/csqltable.conf
20 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
21 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
22 for (( a=1; a<2; a++ ))
24 echo "1:t$a"
25 done >> /tmp/csql/csqltable.conf
27 $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 &
28 pid=$!
29 sleep 5
31 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/join.sql
33 isql $DSN < $REL_PATH/dropall.sql > /dev/null 2>&1
34 kill -9 $pid
35 ipcrm -M 1199 -M 2277
36 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
37 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
38 exit 0;