2 # Testing Durability in MMAP Architecture
3 # set DURABILITY to true and MMAP=true in csql.conf
4 # Start csqlserver. Then create a table t1 in CSQL Client.
5 # kill the currently running Server.
6 # Again Restart the Server by setting DURABILITY=true and Open CSQL Client.
7 # Create another table t2 .
9 # Continue The same for 20 times. Each time tables should be durable
10 # All should work Fine
13 CSQL_CONF
=${PWD}/durability
/recovery
/csql.conf
15 if [ -s "$CSQL_CONF" ]
17 REL_PATH
=${PWD}/durability
/recovery
23 cp -f $REL_PATH/csql.conf
/tmp
24 echo SYS_DB_KEY
=4444 >>/tmp
/csql.conf
25 echo USER_DB_KEY
=6666 >>/tmp
/csql.conf
26 echo "DURABILITY=true" >>/tmp
/csql.conf
27 echo "MMAP=true" >>/tmp
/csql.conf
28 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
30 echo "Durablity = TRUE"
31 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
36 while [[ $i -lt 21 ]];do
37 echo "CREATING TABLE t$i"
38 echo "CREATE TABLE t$i(f1 int,f2 char(100));" >${REL_PATH}/cre_t
$i.sql
39 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/cre_t
$i.sql
>/dev
/null
2>&1
42 rm -f ${REL_PATH}/cre_t
$i.sql
48 $CSQL_INSTALL_ROOT/bin
/csqldump
>before.sql
54 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
58 $CSQL_INSTALL_ROOT/bin
/csqldump
>after.sql
59 diff before.sql after.sql
62 echo Durability Works Fine
67 rm -f before.sql after.sql
69 while [[ $i -lt 21 ]];do
70 echo "DROP TABLE t$i;" >>${REL_PATH}/dropall.sql
74 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
75 rm -f ${REL_PATH}/dropall.sql