*** empty log message ***
[csql.git] / test / adapter / Select / test010na.ksh
blob4101eec6a79eb5e78f2902add4379f3d77e793a3
1 #!/bin/ksh
2 #create table T1 with 10 fields,( F2 NOT NULL , F3 CHAR(20) DEFAULT 'LAKSHYA')
3 #insert 10 rows for 9 Fields except F3 Field 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 echo DSN=$DSN >>$CSQL_CONFIG_FILE
22 DS="$DSN $DBUSER $PASSWORD"
23 rm -f /tmp/csql/csqlds.conf
24 touch /tmp/csql/csqlds.conf
25 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
26 if [ $? -ne 0 ]
27 then
28 exit 1;
31 $CSQL_INSTALL_ROOT/bin/csqlsqlserver >/dev/null 2>&1 &
32 pid=$!
33 sleep 5
34 ${REL_PATH}/selecttest10na
35 if [ $? -ne 0 ]
36 then
37 kill -9 $pid
38 kill `ps -el | grep csqlsqlserver | gawk -F" " '{ print $4 }'`
39 exit 1;
41 rm -f /tmp/csql.conf
42 kill -9 $pid
43 exit 0;