*** empty log message ***
[csql.git] / test / adapter / Select / test009na.ksh
blob9eded3b5856ae498ae9881e0741a5f625fcf6e05
1 #!/bin/ksh
2 #prepare,execute,prepare....,
3 #second prepare should pass.
6 CSQL_CONF=${PWD}/adapter/Select/csql.conf
7 REL_PATH=.
8 if [ -s "$CSQL_CONF" ]
9 then
10 REL_PATH=${PWD}/adapter/Select
13 rm -f /tmp/csql.conf
14 cp $REL_PATH/csql.conf /tmp/csql.conf
15 echo CSQL_SQL_SERVER=true >>/tmp/csql.conf
16 #echo PORT= >>/tmp/csql.conf
17 export CSQL_CONFIG_FILE=/tmp/csql.conf
18 if [ -z "$DBUSER" ]
19 then
20 echo DSN=$DSN >>$CSQL_CONFIG_FILE
21 if [ $DSN = "psql" ]
22 then
23 echo TARGET_DATABASE=postgres >>$CSQL_CONFIG_FILE
24 else
25 echo TARGET_DATABASE=mysql >>$CSQL_CONFIG_FILE
27 DS=$DSN
28 else
29 echo DSN=$DSN >>$CSQL_CONFIG_FILE
30 echo DBUSER=$DBUSER >>$CSQL_CONFIG_FILE
31 echo PASSWORD=$PASSWORD >>$CSQL_CONFIG_FILE
32 echo TARGET_DATABASE=oracle >>$CSQL_CONFIG_FILE
33 DS="$DSN $DBUSER $PASSWORD"
36 $CSQL_INSTALL_ROOT/bin/csqlsqlserver >/dev/null 2>&1 &
37 pid=$!
38 sleep 3
39 ${REL_PATH}/selecttest9na
40 if [ $? -ne 0 ]
41 then
42 kill -9 $pid
43 exit 1;
45 rm -f /tmp/csql.conf
46 kill -9 $pid
47 exit 0;