3 # 9. Create table t1 in mysql with primary key. Insert 10 rows.
4 # Cache the table in csql.
5 # Update 2 rows in csql and 2 rows in mysql with different primary keys.
6 # Run $ cacheverify -t t1.
7 # The output should display number of records as 10 for both csql and
9 # Run $ cacheverify -t t1 -p.
10 # The output should display no missing records in either of the
12 # Run $ cacheverify -t t1 -f.
13 # The output should display the 4 inconsistent records.
14 # Only those fields with different values should be displayed
15 # for inconsistent records.
17 #Run this test only under csql/test or on this directory.
18 #Otherwise, it may fail
20 input
=${PWD}/cache
/CacheVerify
/mysqlinput.sql
24 REL_PATH
=${PWD}/cache
/CacheVerify
27 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
28 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
29 isql
$DSN < ${REL_PATH}/mysqlinput.sql
>/dev
/null
2>&1
32 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
36 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/mysqlinput.sql
>/dev
/null
2>&1
39 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
43 echo "1:t1 NULL NULL NULL" > /tmp
/csql
/csqltable.conf
44 isql
$DSN < ${REL_PATH}/mysqlupdate.sql
>/dev
/null
2>&1
47 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
52 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/csqlupdate.sql
>/dev
/null
2>&1
55 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
59 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
62 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
66 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-p
69 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
73 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-f
76 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
80 rm -f /tmp
/csql
/csqltable.conf
81 touch /tmp
/csql
/csqltable.conf
82 isql
$DSN < $REL_PATH/drop.sql
>/dev
/null
2>&1
83 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
85 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE