3 # create table t4(f1, f2) primary key on f1
4 # create table t5 (f1, f2) , primary key on (f1,f2)
5 # Check -l option on primary flag of the key
8 #Run this test only under csql/test or on this directory.
9 #Otherwise, it may fail
12 CSQL_CONF
=${PWD}/tools
/catalog
/csql.conf
13 input
=${PWD}/tools
/catalog
/create.sql
15 if [ -s "$input" -a -s "$CSQL_CONF" ]
17 REL_PATH
=${PWD}/tools
/catalog
19 export CSQL_CONFIG_FILE
=$REL_PATH/csql.conf
21 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
24 echo "Case 1: create two table t4,t5 "
25 if [ "$VALGRIND" = "true" ]
27 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/createPriFlagTest.sql
2> $0.valgr
29 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/createPriFlagTest.sql
32 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt4t5.sql
37 echo "Case 2: With -l option after for primary flag checking:"
38 if [ "$VALGRIND" = "true" ]
40 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-l 2>> $0.valgr
42 $CSQL_INSTALL_ROOT/bin
/catalog
-u root
-p manager
-l
45 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt4t5.sql
49 echo "case 3 : drop two table "
51 if [ "$VALGRIND" = "true" ]
53 valgrind
--tool=memcheck
--leak-check=full
$CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt4t5.sql
2>> $0.valgr
55 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt4t5.sql
61 echo "t4 ,t5 table droped "