2 # Start TDB and create table in TDB t1(f1 int primary key, f2 int ),
3 # create index idx2 on t1 (f2) and insert 10 records each.
4 # Add entry for t1 table in csqltable.conf file.
5 # Recover with csqlserver -c option.
6 # Verify that it recovers the table with both the index information and
7 # all the records using the csqldump tool.
9 CSQL_CONF
=${PWD}/cache
/Recovery
/csql.conf
10 input
=${PWD}/cache
/Recovery
/createt1.sql
12 if [ -s "$input" -a -s "$CSQL_CONF" ]
14 REL_PATH
=${PWD}/cache
/Recovery
18 cp $REL_PATH/csql.conf
/tmp
19 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
20 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
21 DS
="$DSN $DBUSER $PASSWORD"
22 rm -f /tmp
/csql
/csqlds.conf
23 touch /tmp
/csql
/csqlds.conf
24 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
30 if [ $DSN = "oracle" ]
32 isql
$DS < $REL_PATH/createt1.oracle
> /dev
/null
2>&1
38 isql
$DS < $REL_PATH/createt1.sql
> /dev
/null
2>&1
45 # edit /tmp/csql/csqltable.conf
46 rm -f /tmp
/csql
/csqltable.conf
47 touch /tmp
/csql
/csqltable.conf
48 echo "1 t1 NULL NULL NULL $DSN" >> /tmp
/csql
/csqltable.conf
50 $CSQL_INSTALL_ROOT/bin
/csqlserver
-c >/dev
/null
2>&1 &
54 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf
55 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf
57 $CSQL_INSTALL_ROOT/bin
/csqldump
60 isql
$DS < $REL_PATH/drop.sql
> /dev
/null
2>&1
64 kill -9 $pid > /dev
/null
2>&1
66 isql
$DS < $REL_PATH/drop.sql
> /dev
/null
2>&1
68 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf
69 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf