adding test scripts
[csql.git] / test / tools / csql / test056.ksh
blob54362c26b913142d0755131b3ed8439aab4d41e9
1 #!/bin/ksh
2 #Test case
3 #create table t1(f1 int not null,f2 int,f3 int);
4 #a) create unique index on the first field.
5 #b) create primary index on the same field.
6 #c) create hash primary index on the same field.
7 #b) and c) should fail Saying "Index on this field already exists".
9 QUITFILE=${PWD}/tools/csql/quit.sql
10 REL_PATH=.
11 if [ -s "$QUITFILE" ]
12 then
13 REL_PATH=`pwd`/tools/csql
16 if [ "$VALGRIND" = "true" ]
17 then
18 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree11.sql 2> $0.valgr
19 else
20 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree11.sql
21 if [ $? -ne 0 ]
22 then
23 exit 1;
27 if [ "$VALGRIND" = "true" ]
28 then
29 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csqldump -T t1 2>> $0.valgr
30 else
31 $CSQL_INSTALL_ROOT/bin/csqldump -T t1
34 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql
35 if [ $? -ne 0 ]
36 then
37 exit 2;
40 exit 0;