3 # 4. Create a table t1 with no primary key in mysql. and insert 2 tuples.
4 # Cache the table in csql.
5 # Run $ cacheverify -t t1.
6 # It should display number of records for csql and mysql respectively.
7 # Run $ cacheverify -t t1 -p.
8 # It should give an error saying no primary key is present on table t1.
9 # Run $ cacheverify -t t1 -f.
10 # It should give an error saying no primary key is present on table t1.
12 #Run this test only under csql/test or on this directory.
13 #Otherwise, it may fail
15 input
=${PWD}/cache
/CacheVerify
/inputtest4.sql
19 REL_PATH
=${PWD}/cache
/CacheVerify
22 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
23 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
24 isql
$DSN < ${REL_PATH}/inputtest4.sql
> /dev
/null
2>&1
25 #$CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/inputtest4.sql > /dev/null 2>&1
28 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
32 rm -f /tmp
/csql
/csqltable.conf
33 touch /tmp
/csql
/csqltable.conf
34 echo "1:t1 NULL NULL NULL" >/tmp
/csql
/csqltable.conf
36 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-R>/dev
/null
2>&1
39 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
43 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
46 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
50 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-p
53 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
57 $CSQL_INSTALL_ROOT/bin
/cacheverify
-t t1
-f
60 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
64 rm -f /tmp
/csql
/csqltable.conf
65 touch /tmp
/csql
/csqltable.conf
66 isql
$DSN < ${REL_PATH}/drop.sql
> /dev
/null
2>&1
67 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
69 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE