File Removed
[csql.git] / test / system / Allocator / test007.ksh
blob6584c961549b868781ac0567d0b6f4ce532d01cd
1 #!/bin/sh
2 # TestCase:
3 # check pages used(normal and merged) and chunks used for user database
4 # for i = 1 to 100
5 # create table t1 with two fields and index on first field
6 # create index idx1 on t1 (f1)
7 # drop table t1
8 # end for
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
14 REL_PATH=.
15 if [ -s "$EXECUTABLE" ]
16 then
17 REL_PATH=${PWD}/system/Allocator
20 echo "Case 1: -d option with no table"
21 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d
22 if [ $? -ne 0 ]
23 then
24 exit 1;
27 echo "Tables and Indexes are created"
29 echo "Case 2: -d option with 1 table"
30 count=100
31 while [ ${count} -gt 0 ]
32 do
33 count=`expr ${count} - 1`
34 ${REL_PATH}/create
35 if [ $? -ne 0 ]
36 then
37 echo "create table failed"
38 exit 100;
40 ${REL_PATH}/drop
41 if [ $? -ne 0 ]
42 then
43 echo "drop table failed"
44 exit 100;
46 done
47 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d
48 if [ $? -ne 0 ]
49 then
50 exit 1;
52 exit 0