code reorg for Transactionw!
[csql.git] / test / sql / Predicate / test003.ksh
blobe01c9c152db185d84912dccfc92dfb9c45a9aa55
1 #!/bin/ksh
2 # Testing 'is null'/'is not null' Operators with varchar
3 # CREATE TABLE t1 (f1 INT , f2 VARCHAR (12));
4 # INSERT INTO t1 VALUES(1, 'ABCD');
5 # INSERT INTO t1 VALUES(2, 'NULL');
6 # INSERT INTO t1 VALUES(3, 'ABCEF');
7 # INSERT INTO t1 (f1) VALUES (4);
8 # INSERT INTO t1 VALUES(5, 'ABCFF');
9 # Test the below queries return proper result set or not.
10 # select * from t1;
11 # select * from t1 where f2 is null;
12 # select * from t1 where f2 is not null;
14 CREATEFILE=${PWD}/sql/Predicate/csql.conf
15 REL_PATH=.
16 if [ -s "$CREATEFILE" ]
17 then
18 REL_PATH=`pwd`/sql/Predicate
21 echo "drop table t1;" >${REL_PATH}/dropt1.sql
23 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql >/dev/null 2>&1
25 if [ "$VALGRIND" = "true" ]
26 then
27 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/varchar_NULL.sql
28 else
29 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/varchar_NULL.sql
30 if [ $? -ne 0 ]
31 then
32 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql
33 rm -f ${REL_PATH}/dropt1.sql
34 exit 1;
38 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql
39 if [ $? -ne 0 ]
40 then
41 exit 2;
44 rm -f ${REL_PATH}/dropt1.sql
45 exit 0;