adding test scripts
[csql.git] / test / tools / csql / test115.ksh
blob43aebcf38d6b2c27ed0adaad8ae98ec117c75fdf
1 #!/bin/sh
2 # Test Case
3 # Create table t1 having two integer field f1 ,f2 with primary key f1 .Create table t2 having two integer field f1,f2 with foreign key f1 refers t1 (f1) and Create table t3 having two integer field f1,f2 with foreign key f1 refers t1 (f1). drop FK table t2 and t3.Then drop PK table t1. It should pass.
5 QUITFILE=${PWD}/tools/csql/quit.sql
6 REL_PATH=.
7 if [ -s "$QUITFILE" ]
8 then
9 REL_PATH=`pwd`/tools/csql
12 echo "drop table t2;" >${REL_PATH}/drp1.sql
13 echo "drop table t3;" >>${REL_PATH}/drp1.sql
14 echo "drop table t1;" >>${REL_PATH}/drp1.sql
16 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop_fk_fk_pk.sql
17 if [ $? -ne 0 ]
18 then
19 rm -f ${REL_PATH}/drp1.sql
20 exit 1;
23 rm -f ${REL_PATH}/drp1.sql
24 exit 0;