2 # Testing Durability in MMAP architecture
3 # set DURABILITY = true and MMAP=true in csql.conf
5 # Then create a table t1 in CSQL Client.
6 # create the same table t1 again.
7 # kill the currently running Server.
9 # csqldump should dump the database with table and index information
11 CSQL_CONF
=${PWD}/durability
/recovery
/csql.conf
13 if [ -s "$CSQL_CONF" ]
15 REL_PATH
=${PWD}/durability
/recovery
21 cp -f $REL_PATH/csql.conf
/tmp
22 echo SYS_DB_KEY
=4444 >>/tmp
/csql.conf
23 echo DURABILITY
=true
>>/tmp
/csql.conf
24 echo MMAP
=true
>>/tmp
/csql.conf
25 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
27 echo "Durablity = TRUE"
29 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
33 echo "CREATE TABLE laks(f1 int);" >${REL_PATH}/create.sql
34 echo "DROP TABLE laks;" >${REL_PATH}/drop.sql
36 echo "CREATE TABLE laks(f1 int);"
37 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
>/dev
/null
2>&1
42 rm -f ${REL_PATH}/create.sql
43 rm -f ${REL_PATH}/drop.sql
47 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
>/dev
/null
2>&1
52 rm -f ${REL_PATH}/create.sql
53 rm -f ${REL_PATH}/drop.sql
57 $CSQL_INSTALL_ROOT/bin
/csqldump
>before.sql
63 echo DURABILITY
=true
>>/tmp
/csql.conf
64 echo "Checking Durability"
65 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
68 echo "Server could not be Started"
73 rm -f ${REL_PATH}/create.sql
74 rm -f ${REL_PATH}/drop.sql
81 $CSQL_INSTALL_ROOT/bin
/csqldump
>after.sql
83 diff before.sql after.sql
>/dev
/null
2>&1
86 echo Durability Works Fine
89 rm -f ${REL_PATH}/create.sql
90 rm -f ${REL_PATH}/drop.sql
91 rm -f before.sql after.sql