3 #15. create table t1 and t2 in target DB with 10 records
4 # Load t1 table without condition option
5 # Load t2 with condition " t2f1 < 5 ".
7 # table t1 should be loaded in CSQL with mode 1.
8 # and table t2 should be loaded with mode 2 in csqltable .conf file.
10 # select * from t1, should show all the records,
11 # select * from t2 should show the records as per the condition in the time o f caching.
13 #Run the test only under csql/test or on this directory.
14 #otherwise it may fail.
16 # Author : Jitendra Lenka
18 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
22 REL_PATH
=${PWD}/cache
/CacheTable
25 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
26 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
27 # create table t1,t2 in target DB.
28 isql
$DSN < ${REL_PATH}/create.sql
>/dev
/null
2>&1
31 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
35 echo Table t1 and t2 created
in target DB.
37 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
38 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
40 echo "cachetable -t t1"
41 echo "cachetable -t t2 -c \"t2f1<5\" "
43 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
>/dev
/null
2>&1
46 isql
$DSN < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
47 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
49 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
53 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t2
-c "t2f1<5"
56 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
57 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
58 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
59 isql
$DSN < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
60 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
65 echo "select query on t1 and t2 table"
66 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
68 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
69 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
71 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
72 isql
$DSN <${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
73 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE