Handling no group on Aggregates
[csql.git] / test / system / Allocator / test002.ksh
blobba4cf369e5a49c4ffd7b31199316971f672f7494
1 #!/bin/sh
2 # TestCase:
3 # create table with two fields and index on first field
4 # insert 1000 tuple
5 # check number of tuples, totalPagesused
6 # check pagesUsed for storing hash bucket
7 # check number of index nodes, pagesUsed for storing index nodes
8 # delete 1000 tuple
9 # check number of tuples, totalPagesused
10 # check pagesUsed for storing hash bucket
11 # check number of index nodes, pagesUsed for storing index nodes
13 #Run this test only under csql/test or on this directory.
14 #Otherwise, it may fail
15 EXECUTABLE=${PWD}/system/Allocator/create
16 REL_PATH=.
17 if [ -s "$EXECUTABLE" ]
18 then
19 REL_PATH=${PWD}/system/Allocator
22 ${REL_PATH}/create
23 if [ $? -ne 0 ]
24 then
25 exit 100;
27 echo "Tables and Indexes are created"
28 ${REL_PATH}/insert1000
29 echo "Tuples inserted into table"
30 echo "Case 1: -T option for t1: with 1000 tuple"
31 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1
32 if [ $? -ne 0 ]
33 then
34 exit 1;
37 echo "Case 2: -I option for idx1 of t1, with 1000 tuple"
38 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I t1idx1
39 if [ $? -ne 0 ]
40 then
41 exit 2;
44 ${REL_PATH}/delete1000
46 echo "Tuples deleted from table"
47 echo "Case 3: -T option for t1: after removing 1000 tuple"
48 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1
49 if [ $? -ne 0 ]
50 then
51 exit 3;
54 echo "Case 4: -I option for idx1 of t1, after removing 1000 tuple"
55 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I t1idx1
56 if [ $? -ne 0 ]
57 then
58 exit 4;
61 ${REL_PATH}/drop
62 if [ $? -ne 0 ]
63 then
64 exit 100;
66 echo "Tables and Indexes are dropped"
68 exit 0