3 # check used and free transacation slots in transaction table
6 # insert 1 tuple in 1 transaction and commit
8 # check used and free transacation slots in transaction table
10 #Run this test only under csql/test or on this directory.
11 #Otherwise, it may fail
12 EXECUTABLE
=${PWD}/system
/trans
/create
14 if [ -s "$EXECUTABLE" ]
16 REL_PATH
=${PWD}/system
/trans
18 if [ $VALGRIND = "true" ]
20 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/create
2> $0.valgr
25 echo "create table failed"
30 echo "Case 1: -d option with no transactions"
31 if [ $VALGRIND = "true" ]
33 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D trans
2>> $0.valgr
35 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D trans
43 while [ ${count} -gt 0 ]
45 count
=`expr ${count} - 1`
46 if [ $VALGRIND = "true" ]
48 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/insert1andCommit
2>> $0.valgr
50 ${REL_PATH}/insert1andCommit
>/tmp
/tstlog
58 echo "Case 2: -d option after 120 commits"
59 if [ $VALGRIND = "true" ]
61 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D trans
2>> $0.valgr
63 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D trans
72 echo "drop table failed"