lock manager and chunk allocation mutex modificationsw
[csql.git] / test / jdbc / Gateway / test034.ksh
blobf177e9119a63e92601cc9f319c3ebab02eb20aa8
1 #!/bin/ksh
2 #JDBC GATEWAY CACHE
3 TESTFILE=${PWD}/jdbc/Gateway/ConnTest01.java
4 REL_PATH=.
5 if [ -s "$TESTFILE" ]
6 then
7 REL_PATH=`pwd`/jdbc/Gateway
8 fi
9 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 rm -f /tmp/csql/csqltable.conf
19 touch /tmp/csql/csqltable.conf
20 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
21 if [ $? -ne 0 ]
22 then
23 exit 1;
26 if [ $DSN = "oracle" ]
27 then
28 echo "CREATE TABLE t1 (f1 number(9), f2 number(4), f4 number(37), f5 float, f6 char(10), f7 date, f8 date, f9 timestamp);" >${REL_PATH}/t1create.sql
29 else
30 echo "CREATE TABLE t1 (f1 integer, f2 smallint, f4 bigint, f5 float, f6 char(10), f7 date, f8 time, f9 timestamp);" >${REL_PATH}/t1create.sql
32 echo "drop table t1;">${REL_PATH}/dp.sql
33 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dp.sql
34 isql $DS <${REL_PATH}/dp.sql
35 isql $DS < ${REL_PATH}/t1create.sql >/dev/null 2>&1
36 if [ $? -ne 0 ]
37 then
38 rm -f ${REL_PATH}/t1create.sql
39 exit 1;
42 $CSQL_INSTALL_ROOT/bin/cachetable -t t1
43 #>/dev/null 2>&1
44 if [ $? -ne 0 ]
45 then
46 rm -f ${REL_PATH}/t1create.sql
47 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
48 rm -f ${REL_PATH}/dp.sql
49 exit 2;
52 java GwStmt4
53 if [ $? -ne 0 ]
54 then
55 rm -f ${REL_PATH}/t1create.sql
56 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
57 rm -f ${REL_PATH}/dp.sql
58 exit 3;
61 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -u >/dev/null 2>&1
62 if [ $? -ne 0 ]
63 then
64 rm -f ${REL_PATH}/t1create.sql
65 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
66 rm -f ${REL_PATH}/dp.sql
67 exit 4;
69 isql $DS < ${REL_PATH}/dp.sql >/dev/null 2>&1
70 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dp.sql >/dev/null 2>&1
71 rm -f ${REL_PATH}/dp.sql
72 rm -f ${REL_PATH}/t1create.sql
73 exit 0;