adding test scripts
[csql.git] / test / sqlapi / Csql / DDLStmt / test007n.ksh
blob35c8cd39f1a640009bc6eb645a95a609d2c9cfa9
1 #!/bin/ksh
2 # Create Hash indexes on the fields which are (TINYINT,SMALLINT,INT,BIGINT,CHAR,VARCHAR,DATE,TIME).
3 # CREATE TABLE t1(f1 TINYINT ,f2 SMALLINT ,f3 INT ,f4 BIGINT ,f5 CHAR(20) ,f6 VARCHAR(30) ,f7 FLOAT ,f8 DOUBLE ,f9 DATE ,f10 TIME ,f11 TIMESTAMP);
4 # CREATE INDEX idxtiny ON t1(f1) HASH;
5 # CREATE INDEX idxsmall ON t1(f2) HASH;
6 # CREATE INDEX idxint ON t1(f3) HASH;
7 # CREATE INDEX idxbig ON t1(f4) HASH;
8 # CREATE INDEX idxchar ON t1(f5) HASH;
9 # CREATE INDEX idxvarchar ON t(f6) HASH;
10 # CREATE INDEX idxdate ON t1(f7) HASH;
11 # CREATE INDEX idxtime ON t1(f8) HASH;
12 # All the indexes needs to be created
14 FILE=${PWD}/sqlapi/Csql/DDLStmt/hashindexonalldatatypen
15 REL_PATH=.
16 if [ -s "$FILE" ]
17 then
18 REL_PATH=`pwd`/sqlapi/Csql/DDLStmt
21 if [ "$VALGRIND" = "true" ]
22 then
23 valgrind --tool=memcheck --leak-check=full ${REL_PATH}/hashindexonalldatatypen
24 else
25 $REL_PATH/hashindexonalldatatypen
28 if [ "$VALGRIND" = "true" ]
29 then
30 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -l
31 else
32 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -l
35 echo "echo drop table t1;" >${REL_PATH}/drop_t1.sql
36 echo "drop table t1;" >>${REL_PATH}/drop_t1.sql
38 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop_t1.sql
39 rm -f ${REL_PATH}/drop_t1.sql
40 exit 0