3 # check pages used(normal and merged) and chunks used for user database
4 # create table t1 with two fields and index on first field
5 # create index idx1 on t1 (f1)
6 # check pages used(normal and merged) and chunks used for user database
8 # check pages used(normal and merged) and chunks used for user database
10 #Run this test only under csql/test or on this directory.
11 #Otherwise, it may fail
12 EXECUTABLE
=${PWD}/system
/Allocator
/create
14 if [ -s "$EXECUTABLE" ]
16 REL_PATH
=${PWD}/system
/Allocator
19 echo "Case 1: -d option with no table"
20 if [ $VALGRIND = "true" ]
22 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2> $0.valgr
24 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d
30 if [ $VALGRIND = "true" ]
32 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/create
2>> $0.valgr
41 echo "Tables and Indexes are created"
43 echo "Case 2: -d option with 1 table"
44 if [ $VALGRIND = "true" ]
46 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2>> $0.valgr
48 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d
54 if [ $VALGRIND = "true" ]
56 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/drop
2>> $0.valgr
64 echo "Case 3: -d option after removing table"
65 if [ $VALGRIND = "true" ]
67 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2>> $0.valgr
69 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d