2 # set DURABILITY = true in csql.conf
4 # Then create a table t1 in CSQL Client.
5 # create the same table t1 again.
6 # kill the currently running Server.
8 # csqldump should dump the database with table and index information
10 CSQL_CONF
=${PWD}/durability
/recovery
/csql.conf
12 if [ -s "$CSQL_CONF" ]
14 REL_PATH
=${PWD}/durability
/recovery
20 cp -f $REL_PATH/csql.conf
/tmp
21 echo SYS_DB_KEY
=4444 >>/tmp
/csql.conf
22 echo USER_DB_KEY
=6666 >>/tmp
/csql.conf
23 echo DURABILITY
=true
>>/tmp
/csql.conf
24 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
26 echo "Durablity = TRUE"
28 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
32 echo "CREATE TABLE laks(f1 int);" >${REL_PATH}/create.sql
33 echo "DROP TABLE laks;" >${REL_PATH}/drop.sql
35 echo "CREATE TABLE laks(f1 int);"
36 if [ "$VALGRIND" = "true" ]
38 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
2> $0.valgr
40 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
>/dev
/null
2>&1
45 rm -f ${REL_PATH}/create.sql
46 rm -f ${REL_PATH}/drop.sql
51 if [ "$VALGRIND" = "true" ]
53 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
2>> $0.valgr
55 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
>/dev
/null
2>&1
60 rm -f ${REL_PATH}/create.sql
61 rm -f ${REL_PATH}/drop.sql
66 if [ "$VALGRIND" = "true" ]
68 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csqldump
2>> $0.valgr
70 $CSQL_INSTALL_ROOT/bin
/csqldump
>before.sql
77 echo DURABILITY
=true
>>/tmp
/csql.conf
78 echo "Checking Durability"
79 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
82 echo "Server could not be Started"
87 rm -f ${REL_PATH}/create.sql
88 rm -f ${REL_PATH}/drop.sql
94 if [ "$VALGRIND" = "true" ]
96 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csqldump
2>> $0.valgr
98 $CSQL_INSTALL_ROOT/bin
/csqldump
>after.sql
102 diff before.sql after.sql
>/dev
/null
2>&1
105 echo Durability Works Fine
108 rm -f ${REL_PATH}/create.sql
109 rm -f ${REL_PATH}/drop.sql
110 rm -f before.sql after.sql
112 ipcrm
-M 4444 -M 6666