lock manager and chunk allocation mutex modificationsw
[csql.git] / test / jdbc / Gateway / test031.ksh
blob15a2bf102116b9b911fb81687d356a6d27649636
1 #!/bin/ksh
2 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
3 REL_PATH=.
4 if [ -s "$TESTFILE" ]
5 then
6 REL_PATH=`pwd`/jdbc/Gateway
7 fi
8 export CLASSPATH=$CLASSPATH:${REL_PATH}
10 rm -f /tmp/csql.conf
11 cp $CSQL_CONFIG_FILE /tmp/csql.conf
12 export CSQL_CONFIG_FILE=/tmp/csql.conf
13 echo "CACHE_TABLE=true" >>$CSQL_CONFIG_FILE
14 echo DSN=$DSN >>$CSQL_CONFIG_FILE
15 DS="$DSN $DBUSER $PASSWORD"
16 rm -f /tmp/csql/csqlds.conf
17 touch /tmp/csql/csqlds.conf
18 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
19 if [ $? -ne 0 ]
20 then
21 exit 1;
24 rm -f /tmp/csql/csqltable.conf
25 touch /tmp/csql/csqltable.conf
26 echo "create table t1 (f1 int NOT NULL,f2 char(10),primary key(f1));" >${REL_PATH}/t1create.sql
27 isql $DS < ${REL_PATH}/t1create.sql >/dev/null 2>&1
28 if [ $? -ne 0 ]
29 then
30 rm -f ${REL_PATH}/t1create.sql
31 exit 1;
33 echo "drop table t1;">${REL_PATH}/dp.sql
34 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 >/dev/null 2>&1
35 if [ $? -ne 0 ]
36 then
37 rm -f ${REL_PATH}/t1create.sql
38 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
39 rm -f ${REL_PATH}/dp.sql
40 exit 2;
42 java GwStmt1
43 if [ $? -ne 0 ]
44 then
45 rm -f ${REL_PATH}/t1create.sql
46 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
47 rm -f ${REL_PATH}/dp.sql
48 exit 3;
51 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -u >/dev/null 2>&1
52 if [ $? -ne 0 ]
53 then
54 rm -f ${REL_PATH}/t1create.sql
55 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
56 rm -f ${REL_PATH}/dp.sql
57 exit 4;
59 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
60 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dp.sql >/dev/null 2>&1
61 rm -f ${REL_PATH}/dp.sql
62 rm -f ${REL_PATH}/t1create.sql
63 exit 0;