Test scripts for tree index in csql tool
[csql.git] / test / tools / csql / test046.ksh
blob3e733b093a25cdbe3e596e7929cadbda2223d7d3
1 #!/bin/sh
2 # TEST CASE
3 # 1. create table t1 (f1 int not null, f2 int);
4 # 2. create index idx on t1 (f1) tree unique
5 # 3. insert duplicate records and it should fail
7 QUITFILE=${PWD}/tools/csql/quit.sql
8 REL_PATH=.
9 if [ -s "$QUITFILE" ]
10 then
11 REL_PATH=`pwd`/tools/csql
13 #table creation and insertino of 50 records
14 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree3.sql 2>/dev/null
15 if [ $? -ne 0 ]
16 then
17 exit 1;
19 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/selectstar.sql
20 if [ $? -ne 0 ]
21 then
22 exit 2;
24 echo "50 rows selected";
25 #selecting rows providing condition
26 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/selcond.sql
27 if [ $? -ne 0 ]
28 then
29 exit 3;
31 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql
32 if [ $? -ne 0 ]
33 then
34 exit 4;
36 exit 0;