4 # 2.csqlds.conf fiel has no entries for MySQL and Postgres
6 # Create table t1 in MySQL and t10 in Postgres.
7 # CACHE_TABLE=true in cql.conf file.
8 # cache t1 and t10 from respective TDB.
11 # Author : Jitendra Lenka
13 input
=${PWD}/cache
/MultiDsn
/Connection
/mysqltable.sql
17 REL_PATH
=${PWD}/cache
/MultiDsn
/Connection
21 cp $REL_PATH/csql.conf
/tmp
22 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
24 echo DSN
=$MYSQL_DSN >>$CSQL_CONFIG_FILE
27 rm -f /tmp
/csql
/csqlds.conf
28 touch /tmp
/csql
/csqlds.conf
31 isql
$DS1 < ${REL_PATH}/mysqltable.sql
>/dev
/null
2>&1
36 echo "Table 't1' is created in MySQL."
38 isql
$DS2 < ${REL_PATH}/psqltable.sql
>/dev
/null
2>&1
41 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
44 echo "Table 't10' is created in Postgres"
46 rm -f /tmp
/csql
/csqltable.conf
47 touch /tmp
/csql
/csqltable.conf
49 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
52 #echo $CSQL_INSTALL_ROOT
53 $CSQL_INSTALL_ROOT/bin
/cachetable
-U root
-P manager
-t t1
>/dev
/null
2>&1
58 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
59 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
62 echo "Table 't1' is not cached."
64 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t10
-d $POSTGRES_DSN >/dev
/null
2>&1
69 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
70 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
74 echo "Table 't10' is not cached."
76 rm -f /tmp
/csql
/csqltable.conf
77 touch /tmp
/csql
/csqltable.conf
79 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
80 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
81 echo "Table 't1' and 't10' is dropped from their respective TDB."