2 # Testing 'is null'/'is not null' Operators with varchar using Update statement. ( )
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, NULL);
7 # INSERT INTO t1 VALUES(4, 'ABCEF');
8 # INSERT INTO t1 (f1) VALUES (5);
9 # INSERT INTO t1 VALUES(6, 'ABCFF');
10 # Test the below queries return proper result set or not.
12 # Update t1 set f1= 15, f2=NULL where f2 IS NOT NULL;
13 # Update t1 set f1= 25, f2='CSQL_LAKSHYA' where f2 IS NULL and f1 <= 3;
15 CREATEFILE
=${PWD}/sql
/Predicate
/csql.conf
17 if [ -s "$CREATEFILE" ]
19 REL_PATH
=`pwd`/sql
/Predicate
22 echo "drop table t1;" >${REL_PATH}/dropt1.sql
24 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
>/dev
/null
2>&1
26 if [ "$VALGRIND" = "true" ]
28 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_NULL_upd.sql
30 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_NULL_upd.sql
33 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
34 rm -f ${REL_PATH}/dropt1.sql
39 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
45 rm -f ${REL_PATH}/dropt1.sql