After Direct option ,partial caching implimentation csqltable.conf option change
[csql.git] / test / cache / CacheTable / test014.ksh
blobb2f8e28b16b15e11b2c4bd1f2632bf24a8191e1a
1 #!/bin/sh
2 # Test Case
3 #14. Create 't1' table in Target DB with two records,
4 # Load selected records into CSQL with -c "f1=1" option.
5 # select query executes the selected records from CSQL.
7 #Run this only under csql/test or on this directory, Otherwise it will fail.
9 # Author : Jitendra Lenka
11 input=${PWD}/cache/CacheTable/inputtest4.sql
12 REL_PATH=.
13 if [ -s "$input" ]
14 then
15 REL_PATH=${PWD}/cache/CacheTable
18 isql $DSN < ${REL_PATH}/inputtest4.sql >/dev/null 2>&1
19 if [ $? -ne 0 ]
20 then
21 exit 1;
24 echo Table t1 created with two records in target db.
26 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
27 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
29 #cache from target to csql with -c option
30 echo "cachetable -t t1 -c \"f1=1\" "
31 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -c "f1=1" >/dev/null 2>&1
32 if [ $? -ne 0 ]
33 then
34 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
35 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
37 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
38 isql $DSN < ${REL_PATH}/drop.sql >/dev/null 2>&1
39 exit 2;
42 echo "select * from t1;"
43 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/selectt1.sql
45 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
46 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
48 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
49 isql $DSN < ${REL_PATH}/drop.sql >/dev/null 2>&1
51 exit 0;