2 # Run this test only under csql/test or on this directory.
3 # Otherwise, it may fail
4 # set DURABILITY = true in csql.conf
5 # Start csqlserver. Then create a table in CSQL Client.
6 # kill the currently running Server.
7 # Restart the server by setting DURABILITY = false. and Open CSQL Client.
8 # SHOW TABLES; Statement should not display any table.
10 CSQL_CONF
=${PWD}/tools
/Durability
/csql.conf
12 if [ -s "$CSQL_CONF" ]
14 REL_PATH
=${PWD}/tools
/Durability
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 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/create.sql
40 rm -f ${REL_PATH}/create.sql
41 rm -f ${REL_PATH}/drop.sql
45 $CSQL_INSTALL_ROOT/bin
/csqldump
>before.sql
51 echo DURABILITY
=false
>>/tmp
/csql.conf
52 echo "Durablity = FALSE"
53 echo "Checking Durability"
54 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
59 $CSQL_INSTALL_ROOT/bin
/csqldump
>after.sql
61 diff before.sql after.sql
63 rm -f ${REL_PATH}/create.sql
64 rm -f ${REL_PATH}/drop.sql
65 rm -f before.sql after.sql