3 # create table t1 with records in target DB.
4 # create a table with the same schema in csql .
5 # load with -s option. it should pass.
7 #AUTHOR : Jitendra Lenka
9 input
=${PWD}/cache
/CacheTable
/
13 REL_PATH
=${PWD}/cache
/CacheTable
16 cp $CSQL_CONFIG_FILE /tmp
17 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
18 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
19 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
20 DS
="$DSN $DBUSER $PASSWORD"
21 rm -f /tmp
/csql
/csqlds.conf
22 touch /tmp
/csql
/csqlds.conf
23 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
29 isql
$DS < ${REL_PATH}/fmodeinsert.sql
>/dev
/null
2>&1
30 if [ "$DSN" = "oracle" ]
32 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/fcsqlinputoracle.sql
> /dev
/null
2>&1
34 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/fcsqlinput.sql
> /dev
/null
2>&1
38 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
39 rm -f /tmp
/csql
/csqltable.conf
40 touch /tmp
/csql
/csqltable.conf
44 rm -f /tmp
/csql
/csqltable.conf
45 touch /tmp
/csql
/csqltable.conf
47 # caching with -s option
48 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-s >/dev
/null
2>&1
51 rm -f /tmp
/csql
/csqltable.conf
52 touch /tmp
/csql
/csqltable.conf
53 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
54 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
58 echo "select * from t1;"
59 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/selectt1.sql
62 rm -f /tmp
/csql
/csqltable.conf
63 touch /tmp
/csql
/csqltable.conf
64 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
65 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
69 rm -f /tmp
/csql
/csqltable.conf
70 touch /tmp
/csql
/csqltable.conf
73 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
74 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1