fixing compilation error
[csql.git] / test / cache / CacheTable / test028.ksh
blob307eb03eb0dba829a571325fc56e98d620c83224
1 #!/bin/sh
2 #Test case 28.
4 # create table t1 with records in target DB.
5 # create a table with the same schema in csql .
6 # load with -s option. it should pass.
8 #AUTHOR : Jitendra Lenka
10 input=${PWD}/cache/CacheTable/
11 REL_PATH=.
12 if [ -s "$input" ]
13 then
14 REL_PATH=${PWD}/cache/CacheTable
17 isql myodbc3 < ${REL_PATH}/fmodeinsert.sql >/dev/null 2>&1
19 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/fcsqlinput.sql > /dev/null 2>&1
20 if [ $? -ne 0 ]
21 then
22 isql myodbc3 < ${REL_PATH}/drop.sql >/dev/null 2>&1
23 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
24 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
25 exit 1;
28 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
29 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
31 # caching with -s option
32 $CSQL_INSTALL_ROOT/bin/cachetable -t t1 -s >/dev/null 2>&1
33 if [ $? -ne 0 ]
34 then
35 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
36 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
37 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
38 isql myodbc3 < ${REL_PATH}/drop.sql >/dev/null 2>&1
39 exit 3;
42 echo "select * from t1;"
43 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/selectt1.sql
44 if [ $? -ne 0 ]
45 then
46 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
47 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
48 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
49 isql myodbc3 < ${REL_PATH}/drop.sql >/dev/null 2>&1
50 exit 4;
53 rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db
54 touch /tmp/csql/csqltable.conf /tmp/csql/csql.db
57 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/drop.sql > /dev/null 2>&1
58 isql myodbc3 < ${REL_PATH}/drop.sql >/dev/null 2>&1
59 exit 0;