*** empty log message ***
[csql.git] / test / tools / csql / test124.ksh
blobc3287cf8b3ca22f8a5dc62d5b99ea331b3ffb572
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 f3,f4 with primary key f3 . and create table t3 having two integer field f5,f6 with foreign key f5 refers t1 (f1) and foreign key f6 refers t2 (f3)..It Should be passed. Test all valid and invalid DML Operation Related to Foreign Key
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 t3;" >${REL_PATH}/drp1.sql
13 echo "drop table t2;" >>${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}/foreign7.sql
17 if [ $? -ne 0 ]
18 then
19 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drp1.sql
20 rm -f ${REL_PATH}/drp1.sql
21 exit 1;
24 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drp1.sql
25 if [ $? -ne 0 ]
26 then
27 rm -f ${REL_PATH}/drp1.sql
28 exit 3;
31 rm -f ${REL_PATH}/drp1.sql
32 exit 0;