3 # 6. Create table t1 in mysql with primary key. Insert 10 rows.
4 # Cache the table in csql.
5 # Run $ cacheverify -t t1
6 # The output should display the number of records present in csql
7 # and mysql separately.
8 # Run $ cacheverify -t t1 -p
9 # The output should display no missing records in either database.
10 # Run $ cacheverify -t t1 -f
11 # The output should display no missing records and should display
12 # the data is consistent in both databases.
15 #Run this test only under csql/test or on this directory.
16 #Otherwise, it may fail
18 input
=${PWD}/cache
/CacheVerify
/mysqlinput.sql
22 REL_PATH
=${PWD}/cache
/CacheVerify
25 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
26 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
27 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
28 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
29 DS
="$DSN $DBUSER $PASSWORD"
30 rm -f /tmp
/csql
/csqlds.conf
31 touch /tmp
/csql
/csqlds.conf
32 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
38 if [ $DSN = "oracle" ]
40 isql
$DS < ${REL_PATH}/oracleinput.sql
>/dev
/null
2>&1
45 elif [ $DSN = "myodbc3" ]
47 isql
$DS < ${REL_PATH}/mysqlinput.sql
>/dev
/null
2>&1
52 elif [ $DSN = "sybase" ]
54 isql
$DS < ${REL_PATH}/sybaseinput.sql
>/dev
/null
2>&1
61 isql
$DS < ${REL_PATH}/db2input.sql
>/dev
/null
2>&1
67 isql
$DS < ${REL_PATH}/psqlinput.sql
>/dev
/null
2>&1
74 rm -f /tmp
/csql
/csqltable.conf
75 touch /tmp
/csql
/csqltable.conf
78 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
84 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
90 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-p
96 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-f