File Removed
[csql.git] / test / tools / catalog / test003.ksh
blobdbe85c4d3bb743ad64ff4ff655f163caf63e1d45
1 #!/bin/sh
2 # Test Case
3 # create table t1 (f1, f2) , index t1idx1 on t1(f1), index t1idx2 on t1(f2)
4 # create table t2 (f1, f2) , index t2idx1 on t2(f1)
5 # Check -T option with table having 1 index
6 # Check -T option with table having 2 index
7 # Check -I option on index t1idx2
8 # drop tables t1 and t2
10 #Run this test only under csql/test or on this directory.
11 #Otherwise, it may fail
12 EXECUTABLE=${PWD}/tools/catalog/create
13 REL_PATH=.
14 if [ -s "$EXECUTABLE" ]
15 then
16 REL_PATH=${PWD}/tools/catalog
19 ${REL_PATH}/create
20 if [ $? -ne 0 ]
21 then
22 exit 1;
24 echo "Tables and Indexes are created"
25 echo "Case 1: -T option for t1: with two index"
26 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t1
27 if [ $? -ne 0 ]
28 then
29 exit 1;
32 echo "Case 2: -T option for t2: with one index"
33 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -T t2
34 if [ $? -ne 0 ]
35 then
36 exit 2;
39 echo "Case 3: -I option for idx2 of t1"
40 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I t1idx2
41 if [ $? -ne 0 ]
42 then
43 exit 3;
46 ${REL_PATH}/drop
47 if [ $? -ne 0 ]
48 then
49 exit 100;
51 echo "Tables and Indexes are dropped"
53 exit 0