test cases for trie index
[csql.git] / test / adapter / Select / test005na.ksh
blob9393d87d3e46c3034b0f1d6983a6bdaafc15644b
1 #!/bin/ksh
2 #call execute without calling prepare. it should fail.
4 CSQL_CONF=${PWD}/adapter/Select/csql.conf
5 REL_PATH=.
6 if [ -s "$CSQL_CONF" ]
7 then
8 REL_PATH=${PWD}/adapter/Select
9 fi
11 rm -f /tmp/csql.conf
12 cp $REL_PATH/csql.conf /tmp/csql.conf
13 echo CSQL_SQL_SERVER=true >>/tmp/csql.conf
14 #echo PORT= >>/tmp/csql.conf
15 export CSQL_CONFIG_FILE=/tmp/csql.conf
16 if [ -z "$DBUSER" ]
17 then
18 echo DSN=$DSN >>$CSQL_CONFIG_FILE
19 if [ $DSN = "psql" ]
20 then
21 echo TARGET_DATABASE=postgres >>$CSQL_CONFIG_FILE
22 else
23 echo TARGET_DATABASE=mysql >>$CSQL_CONFIG_FILE
25 DS=$DSN
26 else
27 echo DSN=$DSN >>$CSQL_CONFIG_FILE
28 echo DBUSER=$DBUSER >>$CSQL_CONFIG_FILE
29 echo PASSWORD=$PASSWORD >>$CSQL_CONFIG_FILE
30 echo TARGET_DATABASE=oracle >>$CSQL_CONFIG_FILE
31 DS="$DSN $DBUSER $PASSWORD"
34 $CSQL_INSTALL_ROOT/bin/csqlsqlserver >/dev/null 2>&1 &
35 pid=$!
36 sleep 3
37 ${REL_PATH}/selecttest5na
38 if [ $? -ne 0 ]
39 then
40 kill -9 $pid
41 exit 1;
43 rm -f /tmp/csql.conf
44 kill -9 $pid
45 exit 0;