4 # Create table t1 and t2 in mysql and insert 10 records each.
5 # Cache the tables into csql with -R option.
6 # Create table t3 in csql only and insert few records.
7 # Unload t3 table. It should return error.
9 input
=${PWD}/cache
/CacheTable
/create.sql
13 REL_PATH
=${PWD}/cache
/CacheTable
16 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
17 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
18 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
19 DS
="$DSN $DBUSER $PASSWORD"
20 rm -f /tmp
/csql
/csqlds.conf
21 touch /tmp
/csql
/csqlds.conf
22 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
25 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
29 isql
$DS < ${REL_PATH}/create.sql
>/dev
/null
2>&1
30 echo table t1 and t2 are created with records
in target db
32 rm -f /tmp
/csql
/csqltable.conf
33 touch /tmp
/csql
/csqltable.conf
35 # write to csqltable.conf file
36 echo "1 t1 NULL NULL NULL $DSN" > /tmp
/csql
/csqltable.conf
37 echo "2 t2 NULL t2f1<5 NULL $DSN" >> /tmp
/csql
/csqltable.conf
39 $CSQL_INSTALL_ROOT/bin
/cachetable
-R
42 rm -f /tmp
/csql
/csqltable.conf
43 touch /tmp
/csql
/csqltable.conf
44 isql
$DS < ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
45 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/dropall.sql
> /dev
/null
2>&1
46 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
50 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/createt3.sql
2>&1 >/dev
/null
52 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t3
-u
55 rm -f /tmp
/csql
/csqltable.conf
56 touch /tmp
/csql
/csqltable.conf
57 isql
$DS < ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
58 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/dropall.sql
> /dev
/null
2>&1
59 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
63 rm /tmp
/csql
/csqltable.conf
64 touch /tmp
/csql
/csqltable.conf
65 isql
$DS < ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
66 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/dropall.sql
> /dev
/null
2>&1
67 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE