adding test scripts
[csql.git] / test / tools / csql / test055.ksh
bloba3319878b7657da8909bba1045da94444e1f6ec3
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 hash unique index on the same field.
6 #It should fail Saying "Index on this field already exists".
8 QUITFILE=${PWD}/tools/csql/quit.sql
9 REL_PATH=.
10 if [ -s "$QUITFILE" ]
11 then
12 REL_PATH=`pwd`/tools/csql
15 if [ "$VALGRIND" = "true" ]
16 then
17 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree10.sql 2> $0.valgr
18 else
19 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree10.sql
20 if [ $? -ne 0 ]
21 then
22 exit 1;
26 if [ "$VALGRIND" = "true" ]
27 then
28 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csqldump -T t1 2>> $0.valgr
29 else
30 $CSQL_INSTALL_ROOT/bin/csqldump -T t1
33 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql
34 if [ $? -ne 0 ]
35 then
36 exit 1;