4 # 9.create table t1 (f1 int, f2 int) in mysql and
5 # create table t1 (f1 int, f2 int, f3 int) in csql.
6 # load with no definition option. should fail.
8 #Run this test only under csql/test or on this directory.
9 #Otherwise, it may fail
11 input
=${PWD}/cache
/CacheTable
/create.sql
15 REL_PATH
=${PWD}/cache
/CacheTable
18 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
19 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
20 isql
$DSN < ${REL_PATH}/create.sql
>/dev
/null
2>&1
21 echo table t1 and t2 are created with records
in target db
23 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
24 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
26 # write to the csqltable.conf file
27 echo "1:t1 NULL NULL NULL" > /tmp
/csql
/csqltable.conf
28 echo "2:t2 NULL t2f1>5 NULL" >> /tmp
/csql
/csqltable.conf
30 $CSQL_INSTALL_ROOT/bin
/cachetable
-R
33 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
37 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
39 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/deletefromt1csql.sql
40 isql
$DSN < $REL_PATH/deletefromt2mysql.sql
42 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-r
45 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
48 echo table t1 reloaded
49 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t2
-r
52 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
55 echo table t2 reloaded
57 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
59 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
60 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
61 isql
$DSN < ${REL_PATH}/dropall.sql
>/dev
/null
2>&1
62 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/dropall.sql
> /dev
/null
2>&1
63 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE