4 #18. load t1 table with records in target DB,
5 # create a t1 table in CSQL without record.
6 # load with -s option, it should pass.
8 # AUTHOR : Jitendra Lenka
10 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
14 REL_PATH
=${PWD}/cache
/CacheTable
17 cp $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
26 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
30 isql
$DS < ${REL_PATH}/inputtest4.sql
>/dev
/null
2>&1
31 if [ "$DSN" = "oracle" ]
33 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/csqlinputoracle.sql
> /dev
/null
2>&1
35 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/csqlinput.sql
> /dev
/null
2>&1
39 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
40 rm -f /tmp
/csql
/csqltable.conf
41 touch /tmp
/csql
/csqltable.conf
42 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
46 rm -f /tmp
/csql
/csqltable.conf
47 touch /tmp
/csql
/csqltable.conf
49 # caching with -s option
50 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-s >/dev
/null
2>&1
53 rm -f /tmp
/csql
/csqltable.conf
54 touch /tmp
/csql
/csqltable.conf
55 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
56 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
57 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
61 echo "select * from t1;"
62 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/selectt1.sql
65 rm -f /tmp
/csql
/csqltable.conf
66 touch /tmp
/csql
/csqltable.conf
67 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
68 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
69 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
72 rm -f /tmp
/csql
/csqltable.conf
73 touch /tmp
/csql
/csqltable.conf
75 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
76 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
77 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE