4 # Bi-directional cache test
5 # Cache t1 and t2 table
6 # Set bidirectional flag in csql.conf to true,Create log table in target database
8 input
=${PWD}/cache
/Bidirectional
/mysqlcreatelogtable.sql
13 REL_PATH
=${PWD}/cache
/Bidirectional
16 #cp $CSQL_CONFIG_FILE /tmp/csql.conf
17 #echo DSN=$DSN >>$CSQL_CONFIG_FILE
18 isql
$DSN < $REL_PATH/mysqlcreatelogtable.sql
>/dev
/null
2>&1 &
19 echo Log table created
in target DB
21 isql
$DSN < $REL_PATH/create.sql
>/dev
/null
2>&1
22 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
23 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
24 isql
$DSN <$REL_PATH/droptrigger.sql
>/dev
/null
26 export CSQL_CONFIG_FILE
=$REL_PATH/csql.conf
27 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
29 for (( a
=1; a
<3; a
++ ))
31 echo "1:t$a NULL NULL NULL"
32 done >> /tmp
/csql
/csqltable.conf
34 $CSQL_INSTALL_ROOT/bin
/csqlserver
-c >/dev
/null
2>&1 &
38 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/select.sql
41 echo "unable to locate cache 1"
42 # cp /tmp/csql.conf $CSQL_CONFIG_FILE
46 isql
$DSN < ${REL_PATH}/insert.sql
>/dev
/null
2>&1
48 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/select.sql
50 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
> /dev
/null
2>&1
51 isql
$DSN < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
52 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
53 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
57 # cp /tmp/csql.conf $CSQL_CONFIG_FILE