3 #create table t2 (f1,f2,f3) ,with primary key(f1) and index on f3 .check with -D chunk
4 #insert 20 tuples and check with -D chunk
5 #delete 10 tuples and check with -D chunk
6 #drop t2 check with -D chunk
8 CSQL_CONF
=${PWD}/tools
/catalog
/csql.conf
9 input
=${PWD}/tools
/catalog
/create.sql
11 if [ -s "$input" -a -s "$CSQL_CONF" ]
13 REL_PATH
=${PWD}/tools
/catalog
15 export CSQL_CONFIG_FILE
=$REL_PATH/csql.conf
17 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
21 if [ "$VALGRIND" = "true" ]
23 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/create1.sql
2> $0.valgr
25 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/create1.sql
33 echo "Case 1: With -D chunk option after table creation:"
34 if [ "$VALGRIND" = "true" ]
36 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
2>> $0.valgr
38 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
45 if [ "$VALGRIND" = "true" ]
47 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/insert.sql
2>> $0.valgr
49 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/insert.sql
57 echo "Case 2: With -D chunk option after insert 20 tuples:"
58 if [ "$VALGRIND" = "true" ]
60 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
2>> $0.valgr
62 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
69 if [ "$VALGRIND" = "true" ]
71 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/delete.sql
2>> $0.valgr
73 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/delete.sql
80 echo "10 tuples deleted"
82 echo "Case 3: With -D chunk option after deleting 10 tuples :"
83 if [ "$VALGRIND" = "true" ]
85 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
2>> $0.valgr
87 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
94 if [ "$VALGRIND" = "true" ]
96 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/dropIndex.sql
2>> $0.valgr
98 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/dropIndex.sql
106 echo "Case 4: With -D chunk option after Index droped :"
107 if [ "$VALGRIND" = "true" ]
109 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
2>> $0.valgr
111 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
118 if [ "$VALGRIND" = "true" ]
120 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/dropt2.sql
2>> $0.valgr
122 $CSQL_INSTALL_ROOT/bin
/csql
-u root
-p manager
-s $REL_PATH/dropt2.sql
128 echo "t2 table droped with index"
130 echo "Case 5: With -D chunk option after drop t2 :"
131 if [ "$VALGRIND" = "true" ]
133 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
2>> $0.valgr
135 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-D chunk
143 ipcrm
-M 1199 -M 2277