4 # Create table t1 and t2 in mysql and insert 10 records each.
5 # Cache the tables into csql with -R option.
6 # Unload both tables. Both the tables should get unloaded.
8 #Run this test only under csql/test or on this directory.
9 #Otherwise, it may fail
11 rm -f /tmp
/csql
/csqltable.conf
12 touch /tmp
/csql
/csqltable.conf
13 #cp $CSQL_CONFIG_FILE /tmp/csql.conf
14 #echo DSN=$DSN >>$CSQL_CONFIG_FILE
15 isql
$DS < ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
16 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/dropall.sql
> /dev
/null
2>&1
17 #cp /tmp/csql.conf $CSQL_CONFIG_FILE
21 input
=${PWD}/cache
/CacheTable
/create.sql
25 REL_PATH
=${PWD}/cache
/CacheTable
28 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
29 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
30 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
31 DS
="$DSN $DBUSER $PASSWORD"
32 rm -f /tmp
/csql
/csqlds.conf
33 touch /tmp
/csql
/csqlds.conf
34 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
37 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
41 isql
$DS < ${REL_PATH}/create.sql
>/dev
/null
2>&1
42 echo table t1 and t2 are created with records
in target db
44 rm -f /tmp
/csql
/csqltable.conf
45 touch /tmp
/csql
/csqltable.conf
47 # write to csqltable.conf
48 echo "1 t1 NULL NULL NULL $DSN" > /tmp
/csql
/csqltable.conf
49 echo "2 t2 NULL t2f1<5 NULL $DSN" >> /tmp
/csql
/csqltable.conf
51 $CSQL_INSTALL_ROOT/bin
/cachetable
-R
55 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
59 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-u
63 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
66 echo table t1 unloaded
67 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t2
-u
71 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
74 echo table t2 unloaded
75 grep t1
/tmp
/csql
/csqltable.conf
79 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
83 grep t2
/tmp
/csql
/csqltable.conf
87 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
91 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE