2 #Insert 5 stmt, upd 2 stmt, del 1 stmt, select 2 record
3 # check stmt and redo logs. Recover and check logs
4 CSQL_CONF
=${PWD}/durability
/redologs
/csql.conf
8 REL_PATH
=${PWD}/durability
/redologs
14 cp -f $REL_PATH/csql.conf
/tmp
15 echo SYS_DB_KEY
=4444 >>/tmp
/csql.conf
16 echo ID_SHM_KEY
=6666 >>/tmp
/csql.conf
17 echo DURABILITY
=true
>>/tmp
/csql.conf
18 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
21 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
25 echo "CREATE TABLE laks(f1 int, f2 int);" >${REL_PATH}/t1.sql
26 echo "INSERT INTO laks values (10, 10);" >>${REL_PATH}/t1.sql
27 echo "INSERT INTO laks values (20, 20);" >>${REL_PATH}/t1.sql
28 echo "INSERT INTO laks values (30, 30);" >>${REL_PATH}/t1.sql
29 echo "INSERT INTO laks values (40, 40);" >>${REL_PATH}/t1.sql
30 echo "INSERT INTO laks values (50, 50);" >>${REL_PATH}/t1.sql
31 echo "UPDATE laks set f2=60 where f1=30;" >>${REL_PATH}/t1.sql
32 echo "UPDATE laks set f2=70 where f1=30;" >>${REL_PATH}/t1.sql
33 echo "DELETE FROM laks where f1=20;" >>${REL_PATH}/t1.sql
34 echo "SELECT * FROM laks where f1 > 30;" >>${REL_PATH}/t1.sql
36 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s ${REL_PATH}/t1.sql
41 rm -f ${REL_PATH}/t1.sql
44 $CSQL_INSTALL_ROOT/bin
/redo
-al
50 echo "Checking Durability"
51 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
56 $CSQL_INSTALL_ROOT/bin
/redo
-al
58 rm -f ${REL_PATH}/t1.sql