2 #This test requires kernel.shmmax to be 1GB, otherwise it may fail
5 # Start TDB and create 100 tables in TDB t1(f1 int primary key, f2 int), i
6 # t2(f1 int primary key, f2 int), ... t100 and insert 10 records each.
7 # Add entries for all 100 tables in csqltable.conf.
8 # Recover with csqlserver -c option.
9 # Verify that it recovers all the tables with index information and all
10 # the records using the csqldump tool.
12 CSQL_CONF
=${PWD}/cache
/Recovery
/csql.conf
13 input
=${PWD}/cache
/Recovery
/create.sql
15 if [ -s "$input" -a -s "$CSQL_CONF" ]
17 REL_PATH
=${PWD}/cache
/Recovery
21 cp $REL_PATH/csql.conf
/tmp
22 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
24 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
25 DS
="$DSN $DBUSER $PASSWORD"
26 rm -f /tmp
/csql
/csqlds.conf
27 touch /tmp
/csql
/csqlds.conf
28 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
34 isql
$DS < $REL_PATH/create.sql
>/dev
/null
2>&1
40 # edit /tmp/csql/csqltable.conf
41 rm -f /tmp
/csql
/csqltable.conf
42 touch /tmp
/csql
/csqltable.conf
45 while [[ $a -lt 101 ]];do
46 echo "1 t$a NULL NULL NULL $DSN"
48 done >> /tmp
/csql
/csqltable.conf
50 $CSQL_INSTALL_ROOT/bin
/csqlserver
-c >/dev
/null
2>&1 &
53 rm -f /tmp
/csql
/csqltable.conf
54 touch /tmp
/csql
/csqltable.conf
56 $CSQL_INSTALL_ROOT/bin
/csqldump
59 kill -9 $pid > /dev
/null
2>&1
61 isql
$DS < $REL_PATH/dropall.sql
> /dev
/null
2>&1
65 isql
$DS < $REL_PATH/dropall.sql
> /dev
/null
2>&1
66 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf
67 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csqlds.conf
68 kill -9 $pid > /dev
/null
2>&1