2 # Default value testing with varchar.
3 # Create table t1( f1 int, f2 varchar(15) default 'CSQL');
4 # Insert 5 records into t1 having null values in f1 for some of the records.
5 # insert into t1 values(2,NULL); This will put NULL in f2 field.
6 # update t1 set f2=NULL where f2='Lakshya3'; this will put null in f2 field where f2='Lakshya3'
7 # Retrieve records based on varchar field.
9 CREATEFILE
=${PWD}/sql
/Datatype
/csql.conf
11 if [ -s "$CREATEFILE" ]
13 REL_PATH
=`pwd`/sql
/Datatype
16 echo "drop table t1;" >${REL_PATH}/dropt1.sql
18 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
>/dev
/null
2>&1
20 if [ "$VALGRIND" = "true" ]
22 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_default.sql
24 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/varchar_default.sql
27 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
28 rm -f ${REL_PATH}/dropt1.sql
33 if [ "$VALGRIND" = "true" ]
35 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-l
37 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-l
40 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1.sql
46 rm -f ${REL_PATH}/dropt1.sql