packaging changes
[csql.git] / test / system / Allocator / test006.ksh
blob23307690ddcfa1677d907abcaa592f0ac8cd534e
1 #!/bin/sh
2 # TestCase:
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
7 # drop table t1
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
13 REL_PATH=.
14 if [ -s "$EXECUTABLE" ]
15 then
16 REL_PATH=${PWD}/system/Allocator
19 echo "Case 1: -d option with no table"
20 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d
21 if [ $? -ne 0 ]
22 then
23 exit 1;
26 ${REL_PATH}/create
27 if [ $? -ne 0 ]
28 then
29 exit 100;
31 echo "Tables and Indexes are created"
33 echo "Case 2: -d option with 1 table"
34 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d
35 if [ $? -ne 0 ]
36 then
37 exit 1;
40 ${REL_PATH}/drop
41 if [ $? -ne 0 ]
42 then
43 exit 100;
46 echo "Case 3: -d option after removing table"
47 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -d
48 if [ $? -ne 0 ]
49 then
50 exit 3;
53 exit 0