4 # 10.csqlds.conf fiel has the entries for Postgres and not for MySQL.
5 # Default dsn is "psql" in csql.conf file.
7 # Create table t1 in MyQL and t10 in Postgres.
8 # CACHE_TABLE=true in cql.conf file.
9 # cache t1 and t10 from respective TDB,
10 # The table 't1' will not be cached.
14 input
=${PWD}/cache
/MultiDsn
/Connection
/mysqltable.sql
18 REL_PATH
=${PWD}/cache
/MultiDsn
/Connection
22 cp $REL_PATH/csql.conf
/tmp
23 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
25 echo DSN
=$POSTGRES_DSN >>$CSQL_CONFIG_FILE
27 rm -f /tmp
/csql
/csqlds.conf
28 touch /tmp
/csql
/csqlds.conf
30 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $POSTGRES_USER -P $POSTGRES_PASSWORD -D $POSTGRES_DSN -N $POSTGRES_TDB -a
35 echo "Entry made for $POSTGRES_DSN in csqlds.conf file"
37 isql
$DS1 < ${REL_PATH}/mysqltable.sql
>/dev
/null
2>&1
42 echo "Table t1 is created in $MYSQL_TDB."
44 isql
$DS2 < ${REL_PATH}/psqltable.sql
>/dev
/null
2>&1
47 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
50 echo "Table t10 is created in $POSTGRES_TDB"
52 rm -f /tmp
/csql
/csqltable.conf
53 touch /tmp
/csql
/csqltable.conf
55 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
58 echo "CSQL Server is started."
60 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-d $MYSQL_DSN >/dev
/null
2>&1
65 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
66 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
69 echo "Table 't1' is not cached from $MYSQL_DSN"
71 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t10
> /dev
/null
2>&1
76 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
77 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
80 echo "Table 't10' is cached from $POSTGRES_DSN"
82 rm -f /tmp
/csql
/csqltable.conf
83 touch /tmp
/csql
/csqltable.conf
85 isql
$DS1 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
86 isql
$DS2 < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
87 echo "Table t1 and t10 is dropped in TDB."
89 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
> /dev
/null
2>&1
90 echo "Table is dropped in CSQL."