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.
11 # select * from t1 where f2 is null;
12 # select * from t1 where f2 is not null;
14 CREATEFILE
=${PWD}/sql
/Predicate
/csql.conf
16 if [ -s "$CREATEFILE" ]
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" ]
27 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_NULL.sql
29 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_NULL.sql
32 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
33 rm -f ${REL_PATH}/dropt1.sql
38 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
44 rm -f ${REL_PATH}/dropt1.sql