*** empty log message ***
[csql.git] / test / adapter / Select / test011na.ksh
blob6d26bfe5f467c9f1e181b0e88e0bed8d5bf74a3f
1 #!/bin/ksh
2 #One connection working with multiple statements
3 #create table T1 with two fields,
4 #One connection working with multiple statements simultaneously for csql,
5 #Create conn
6 #create 3 stmts for inserting into 5 tables and set the same connection
7 #insert into all 3 tables and commit the transaction
8 #free all stmts
9 #select the records from 3 tables in same connection
10 #free all stmt;
11 #Author : Nihar Paital
14 CSQL_CONF=${PWD}/adapter/Select/csql.conf
15 REL_PATH=.
16 if [ -s "$CSQL_CONF" ]
17 then
18 REL_PATH=${PWD}/adapter/Select
21 rm -f /tmp/csql.conf
22 cp $REL_PATH/csql.conf /tmp/csql.conf
23 echo CSQL_SQL_SERVER=true >>/tmp/csql.conf
24 #echo PORT= >>/tmp/csql.conf
25 export CSQL_CONFIG_FILE=/tmp/csql.conf
26 echo DSN=$DSN >>$CSQL_CONFIG_FILE
27 DS="$DSN $DBUSER $PASSWORD"
28 rm -f /tmp/csql/csqlds.conf
29 touch /tmp/csql/csqlds.conf
30 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
31 if [ $? -ne 0 ]
32 then
33 exit 1;
36 $CSQL_INSTALL_ROOT/bin/csqlsqlserver >/dev/null 2>&1 &
37 pid=$!
38 sleep 5
39 ${REL_PATH}/singleconnadapterna
40 if [ $? -ne 0 ]
41 then
42 kill -9 $pid
43 kill `ps -el | grep csqlsqlserver | gawk -F" " '{ print $4 }'`
44 exit 1;
46 rm -f /tmp/csql.conf
47 kill -9 $pid
48 exit 0;