adding test scripts
[csql.git] / test / sql / StmtCache / test009.ksh
blobafb43a485a89684c41a51bcaa2f1073dd713e9a2
1 #!/bin/ksh
2 # For cached stmts, after create index statement, all the inserts of the cached statement should go into the index structure
3 # After free and reprepare for INSERT statement, inserts should go to index structures also
5 CREATEFILE=${PWD}/sql/StmtCache/csql.conf
6 REL_PATH=.
7 if [ -s "$CREATEFILE" ]
8 then
9 REL_PATH=`pwd`/sql/StmtCache
12 echo "drop table t1;" >${REL_PATH}/dropt1.sql
14 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql >/dev/null 2>&1
15 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/t1.sql >/dev/null 2>&1
18 if [ "$VALGRIND" = "true" ]
19 then
20 valgrind --tool=memcheck --leak-check=full $REL_PATH/stmtTest9
21 else
22 $REL_PATH/stmtTest9
23 if [ $? -ne 0 ]
24 then
25 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql
26 rm -f ${REL_PATH}/dropt1.sql
27 exit 1;
30 echo "select * from t1 where f2=100;" >${REL_PATH}/sel.sql
31 echo "select * from t1 where f2=200;" >>${REL_PATH}/sel.sql
32 echo "select * from t1 where f2=300;" >>${REL_PATH}/sel.sql
33 $CSQL_INSTALL_ROOT/bin/csqldump
34 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sel.sql
35 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1.sql >/dev/null 2>&1
36 rm -f ${REL_PATH}/dropt1.sql
38 exit 0;