*** empty log message ***
[csql.git] / test / adapter / Select / test002na.ksh
blob3f3ea014f295ef72ebbf52a9bd1a0f609dd33a25
1 #!/bin/ksh
2 #create table T1 with 10 fields,
3 #insert 10 rows into the table ,
4 #noofprojFields should return 5.
5 #getProjFldInfo() for all fields.
6 #select with 5 parameters withIwhere clause.(WHERE F1=100)
9 CSQL_CONF=${PWD}/adapter/Select/csql.conf
10 REL_PATH=.
11 if [ -s "$CSQL_CONF" ]
12 then
13 REL_PATH=${PWD}/adapter/Select
16 rm -f /tmp/csql.conf
17 cp $REL_PATH/csql.conf /tmp/csql.conf
18 echo CSQL_SQL_SERVER=true >>/tmp/csql.conf
19 #echo PORT= >>/tmp/csql.conf
20 export CSQL_CONFIG_FILE=/tmp/csql.conf
21 if [ -z "$DBUSER" ]
22 then
23 echo DSN=$DSN >>$CSQL_CONFIG_FILE
24 if [ $DSN = "psql" ]
25 then
26 echo TARGET_DATABASE=postgres >>$CSQL_CONFIG_FILE
27 else
28 echo TARGET_DATABASE=mysql >>$CSQL_CONFIG_FILE
30 DS=$DSN
31 else
32 echo DSN=$DSN >>$CSQL_CONFIG_FILE
33 echo DBUSER=$DBUSER >>$CSQL_CONFIG_FILE
34 echo PASSWORD=$PASSWORD >>$CSQL_CONFIG_FILE
35 echo TARGET_DATABASE=oracle >>$CSQL_CONFIG_FILE
36 DS="$DSN $DBUSER $PASSWORD"
38 $CSQL_INSTALL_ROOT/bin/csqlsqlserver >/dev/null 2>&1 &
39 pid=$!
40 sleep 3
41 ${REL_PATH}/selecttest2na
42 if [ $? -ne 0 ]
43 then
44 kill -9 $pid
45 exit 1;
47 rm -f /tmp/csql.conf
48 kill -9 $pid
49 exit 0;