adding DSN to csql.conf based on the cache test mode
[csql.git] / test / cache / DDL / test001.ksh
blob09a96fde68356c75791dcf382706f7e0b3bad24e
1 #!/bin/sh
3 # 1. create table t5. It should be created only in csql and not in mysql5.
5 #Run this test only under csql/test or on this directory.
6 #Otherwise, it may fail
8 CSQL_CONF=${PWD}/cache/DDL/csql.conf
9 input=${PWD}/cache/DDL/csqlinputtest1.sql
10 REL_PATH=.
11 if [ -s "$input" -a -s "$CSQL_CONF" ]
12 then
13 REL_PATH=${PWD}/cache/DDL
15 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
16 echo DSN=$DSN >> $CSQL_CONFIG_FILE
17 $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
18 pid=$!
19 sleep 5
20 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/csqlinputtest1.sql
21 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/selectstar.sql
22 isql $DSN < $REL_PATH/selectstar.sql
23 $CSQL_INSTALL_ROOT/bin/csql -g -s $REL_PATH/dropall.sql >/dev/null 2>&1
24 kill -9 $pid
25 ipcrm -M 1199 -M 2277
26 exit 0;