3 # check pages used(normal and merged) and chunks used for user database
4 # create table t1 with two fields
5 # check pages used(normal and merged) and chunks used for user database
7 # check pages used(normal and merged) and chunks used for user database
9 #Run this test only under csql/test or on this directory.
10 #Otherwise, it may fail
11 EXECUTABLE
=${PWD}/system
/Allocator
/create
13 if [ -s "$EXECUTABLE" ]
15 REL_PATH
=${PWD}/system
/Allocator
18 echo "Case 1: -d option with no table"
19 if [ "$VALGRIND" = "true" ]
21 valgrind
--tool=memcheck
--leak-check=full
2> $0.valgr
23 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d
30 if [ $VALGRIND = "true" ]
32 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/createNoIndex
2>> $0.valgr
34 ${REL_PATH}/createNoIndex
40 echo "Tables and Indexes are created"
42 echo "Case 2: -d option with 1 table"
43 if [ $VALGRIND = "true" ]
45 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2>> $0.valgr
47 $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
65 echo "Case 3: -d option after removing table"
66 if [ $VALGRIND = "true" ]
68 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2>> $0.valgr
70 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d