lock manager and chunk allocation mutex modificationsw
[csql.git] / test / jdbc / Gateway / test051.ksh
blob147f96b80c26e21ae61d3ef64ec345b8290011df
1 #!/bin/ksh
2 # Connect with connectstring "jdbc:gateway"
3 # Create a table and index for that table. Then do (INSERT/UPDATE/DELETE/SELECT) with no params statement. when csqlserver is not runnig
4 # GwTest11.java
5 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
6 REL_PATH=.
7 if [ -s "$TESTFILE" ]
8 then
9 REL_PATH=`pwd`/jdbc/Gateway
11 export CLASSPATH=$CLASSPATH:${REL_PATH}
12 rm -f /tmp/csql.conf
13 cp $CSQL_CONFIG_FILE /tmp/csql.conf
14 export CSQL_CONFIG_FILE=/tmp/csql.conf
15 #export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
16 echo "create table t1 (f1 int,f2 char(10),primary key(f1));" >${REL_PATH}/t1create.sql
18 echo DSN=$DSN >>$CSQL_CONFIG_FILE
19 DS="$DSN $DBUSER $PASSWORD"
20 rm -f /tmp/csql/csqlds.conf
21 touch /tmp/csql/csqlds.conf
22 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
23 if [ $? -ne 0 ]
24 then
25 exit 1;
28 isql $DS < ${REL_PATH}/t1create.sql >/dev/null 2>&1
29 if [ $? -ne 0 ]
30 then
31 rm -f ${REL_PATH}/t1create.sql
32 exit 1;
34 java GwTest11
35 if [ $? -ne 0 ]
36 then
37 exit 2;
40 echo "drop table t1;">${REL_PATH}/dp.sql
41 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
42 rm -f ${REL_PATH}/dp.sql
43 rm -f ${REL_PATH}/t1create.sql
45 exit 0;