adding test scripts
[csql.git] / test / tools / csql / test058.ksh
blob66307425d3b144bc316eff23708e1bdbd41b1e45
1 #!/bin/ksh
2 #Test case
3 #create table t1(f1 int not null,f2 int,f3 int);
4 #a) create hash unique index on the first field.
5 #b) create tree unique index on the same field.
6 #It should be passed
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}/tree13.sql 2> $0.valgr
18 else
19 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree13.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 2;
39 exit 0;