fixing compilation error
[csql.git] / test / cache / Gateway / test012a.ksh
blob0490464c2d6302b792f2c761768b2e0f0af03f17
1 #!/bin/sh
3 # 12.csqlserver not running
4 # a)connect,select
5 # oncached 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 CSQL_CONF=${PWD}/cache/Gateway/csql.conf
10 input=${PWD}/cache/Gateway/mysqlinputtest1.sql
11 REL_PATH=.
12 if [ -s "$input" -a -s "$CSQL_CONF" ]
13 then
14 REL_PATH=${PWD}/cache/Gateway
16 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
17 echo DSN=$DSN >> $CSQL_CONFIG_FILE
18 isql $DSN < $REL_PATH/mysqlinputtest1.sql > /dev/null 2>&1
19 isql $DSN < $REL_PATH/mysqlinputtest12.sql > /dev/null 2>&1
21 # edit /tmp/csql/csqltable.conf
22 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
23 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
24 for (( a=1; a<2; a++ ))
26 echo "1:t$a NULL NULL NULL"
27 done >> /tmp/csql/csqltable.conf
29 $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 &
30 pid=$!
31 sleep 5
32 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/csqlinputtest12.sql >/dev/null 2>&1
33 kill -9 $pid
34 ipcrm -M 1199 -M 2277
36 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstart2.sql
37 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstar.sql
38 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstart3.sql
39 isql $DSN < $REL_PATH/dropall.sql > /dev/null 2>&1
41 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
42 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
43 exit 0;