test cases for trie index
[csql.git] / test / sql / DDL / test001.ksh
blob7e27e5e6c23e2ef84f4904481b940e10a9f7759f
1 #!/bin/ksh
2 # Testing truncate command.
3 # Create table t1 with all datatypes.
4 # insert 2 - 3 records into it.
5 # Execute truncate table t1;
6 # it should delete all the records.
8 QUITFILE=${PWD}/sql/DDL/drop.sql
9 REL_PATH=.
10 if [ -s "$QUITFILE" ]
11 then
12 REL_PATH=`pwd`/sql/DDL
15 echo "drop table t1;" >${REL_PATH}/dropt1.sql
17 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql >/dev/null 2>&1
19 if [ "$VALGRIND" = "true" ]
20 then
21 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/truncatet1.sql
22 else
23 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/truncatet1.sql
24 if [ $? -ne 0 ]
25 then
26 rm -f ${REL_PATH}/dropt1.sql
27 exit 1;
31 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/dropt1.sql
32 rm -f ${REL_PATH}/dropt1.sql
33 exit 0;