code reorg for Transactionw!
[csql.git] / test / sql / Datatype / test009.ksh
blob2988d5ce646f6cb521de2a2d0bec6b907694fd55
1 #!/bin/ksh
2 # Composite key(HASH) on varchar with other types.
3 # Create table t1(f1 tinyint, f2 smallint, f3 int, f4 bigint, f5 char(10), f6 varchar(10), f7 float, f8 double,f9 Date, f10 Time, f11 Timestamp);
4 # create index hashidxtinyvar on t1(f1, f6);
5 # create index hashidxsmallvar on t1(f2, f6);
6 # create index hashidxvarint on t1(f6, f3);
7 # create index hashidxvarbig on t1(f6, f4);
8 # create index hashidxcharvar on t1(f5, f6);
9 # create index hashidxvardate on t1(f6, f9);
10 # create index hashidxvartime on t1(f6, f10);
11 # create index hashidxvarfloat on t1(f6, f7); should be fail.
12 # create index hashidxvardouble on t1(f6, f8); should be fail.
13 # create index hashidxvartimestamp on t1(f6, f11); should be fail.
14 # Run catalog tool for check the indexes are made properly or not.
16 CREATEFILE=${PWD}/sql/Datatype/csql.conf
17 REL_PATH=.
18 if [ -s "$CREATEFILE" ]
19 then
20 REL_PATH=`pwd`/sql/Datatype
23 echo "drop table t1;" >${REL_PATH}/dropt1.sql
25 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql >/dev/null 2>&1
27 if [ "$VALGRIND" = "true" ]
28 then
29 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/varchar_compindex.sql
30 else
31 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/varchar_compindex.sql
32 if [ $? -ne 0 ]
33 then
34 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql
35 rm -f ${REL_PATH}/dropt1.sql
36 exit 1;
40 if [ "$VALGRIND" = "true" ]
41 then
42 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -l
43 else
44 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -l
47 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql
48 if [ $? -ne 0 ]
49 then
50 exit 2;
53 rm -f ${REL_PATH}/dropt1.sql
54 exit 0;