3 # check pages used(normal and merged) and chunks used for user database
5 # create table t1 with two fields and index on first field
6 # create index idx1 on t1 (f1)
9 # check pages used(normal and merged) and chunks used for user database
11 #Run this test only under csql/test or on this directory.
12 #Otherwise, it may fail
13 EXECUTABLE
=${PWD}/system
/Allocator
/create
15 if [ -s "$EXECUTABLE" ]
17 REL_PATH
=${PWD}/system
/Allocator
20 echo "Case 1: -d option with no table"
21 if [ $VALGRIND = "true" ]
23 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2> $0.valgr
25 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d
31 echo "Tables and Indexes are created"
33 echo "Case 2: -d option with 1 table"
35 while [ ${count} -gt 0 ]
37 count
=`expr ${count} - 1`
38 if [ $VALGRIND = "true" ]
40 valgrind
--tool=memcheck
--leak-check=full
${REL_PATH}/create
2>> $0.valgr
45 echo "create table failed"
52 echo "drop table failed"
56 if [ $VALGRIND = "true" ]
58 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d 2>> $0.valgr
60 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-d