*** empty log message ***
[csql.git] / test / cache / CacheVerify / test008.ksh
blob7fdda41f07843f27b8fece409c61ab60d31a3c3f
1 #!/bin/sh
2 # Test Case
4 # 8. For the previous scenario update 2 rows in csql and update 2 rows in mysql with different primary keys.
5 # Run $ cacheverify -t t1.
6 # The output should display number of records as 7 and 8 for csql
7 # and mysql respectively.
8 # Run $ cacheverify -t t1 -p.
9 # The output should display the primary key field values for missing
10 # records in either of the databases in ascending order.
11 # Run $ cacheverify -t t1 -f.
12 # The output should display the 4 inconsistent records. Only those
13 # fields with different values should be displayed for inconsistent
14 # records.
16 #Run this test only under csql/test or on this directory.
17 #Otherwise, it may fail
19 input=${PWD}/cache/CacheVerify/csqlupdate.sql
20 REL_PATH=.
21 if [ -s "$input" ]
22 then
23 REL_PATH=${PWD}/cache/CacheVerify
26 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/csqlupdate.sql >/dev/null 2>&1
27 if [ $? -ne 0 ]
28 then
29 exit 1;
32 cp $CSQL_CONFIG_FILE /tmp/csql.conf
33 echo DSN=$DSN >>$CSQL_CONFIG_FILE
34 isql $DSN < ${REL_PATH}/mysqlupdate.sql >/dev/null 2>&1
35 if [ $? -ne 0 ]
36 then
37 cp /tmp/csql.conf $CSQL_CONFIG_FILE
38 exit 2;
41 $CSQL_INSTALL_ROOT/bin/cacheverify -t t1
42 if [ $? -ne 0 ]
43 then
44 cp /tmp/csql.conf $CSQL_CONFIG_FILE
45 exit 3;
48 $CSQL_INSTALL_ROOT/bin/cacheverify -t t1 -p
49 if [ $? -ne 0 ]
50 then
51 cp /tmp/csql.conf $CSQL_CONFIG_FILE
52 exit 4;
55 $CSQL_INSTALL_ROOT/bin/cacheverify -t t1 -f
56 if [ $? -ne 0 ]
57 then
58 cp /tmp/csql.conf $CSQL_CONFIG_FILE
59 exit 5;
62 rm -f /tmp/csql/csqltable.conf
63 touch /tmp/csql/csqltable.conf
64 isql $DSN < $REL_PATH/drop.sql >/dev/null 2>&1
65 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/drop.sql >/dev/null 2>&1
67 cp /tmp/csql.conf $CSQL_CONFIG_FILE
68 exit 0;