3 #17. Create table t1 and t2 in target DB with 10 records.
4 # Add following entries in csqltable.conf file:
7 # Recover the two tables from the target DB with -R option.
8 # CSQL should contain 10 records of t1 and 4 records of t2
10 #Run this test only under csql/test or on this directory
11 #otherwise it may fail.
13 #AUTHOR : Jitendra Lenka
15 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
19 REL_PATH
=${PWD}/cache
/CacheTable
22 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
23 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
24 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
25 DS
="$DSN $DBUSER $PASSWORD"
26 rm -f /tmp
/csql
/csqlds.conf
27 touch /tmp
/csql
/csqlds.conf
28 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
31 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
35 # create table t1,t2 in target DB.
36 isql
$DS < ${REL_PATH}/create.sql
>/dev
/null
2>&1
39 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
42 echo Table t1 and t2 created
in target DB.
44 rm -f /tmp
/csql
/csqltable.conf
45 touch /tmp
/csql
/csqltable.conf
47 echo "1 t1 NULL NULL NULL $DSN" > /tmp
/csql
/csqltable.conf
48 echo "2 t2 NULL t2f1<5 NULL $DSN" >> /tmp
/csql
/csqltable.conf
50 # caching with -R option
51 $CSQL_INSTALL_ROOT/bin
/cachetable
-R
54 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
58 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
61 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
62 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
63 rm -f /tmp
/csql
/csqltable.conf
64 touch /tmp
/csql
/csqltable.conf
65 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
69 rm -f /tmp
/csql
/csqltable.conf
70 touch /tmp
/csql
/csqltable.conf
71 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
72 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
73 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE