From fc45a7103fb2e5a1d4c038339ab7a752ea34a4fc Mon Sep 17 00:00:00 2001 From: niharlcp1 Date: Wed, 26 Nov 2008 16:05:20 +0000 Subject: [PATCH] creating tree unique index on a field based on which a primary key already exist --- test/tools/csql/exp.test061.ksh | 8 ++++++++ test/tools/csql/test061.ksh | 25 +++++++++++++++++++++++++ test/tools/csql/tree16.sql | 4 ++++ 3 files changed, 37 insertions(+) create mode 100644 test/tools/csql/exp.test061.ksh create mode 100755 test/tools/csql/test061.ksh create mode 100644 test/tools/csql/tree16.sql diff --git a/test/tools/csql/exp.test061.ksh b/test/tools/csql/exp.test061.ksh new file mode 100644 index 00000000..702f1dd8 --- /dev/null +++ b/test/tools/csql/exp.test061.ksh @@ -0,0 +1,8 @@ +Statement Executed +echo create index idx1 on t1(f1) tree unique; +Statement Executed +CREATE TABLE t1 (f1 INT NOT NULL , f2 INT , f3 INT ); +CREATE INDEX t1_idx1_Primary on t1 ( f1 ) HASH UNIQUE; +CREATE INDEX idx1 on t1 ( f1 ) TREE UNIQUE; +SET AUTOCOMMIT OFF; +Statement Executed diff --git a/test/tools/csql/test061.ksh b/test/tools/csql/test061.ksh new file mode 100755 index 00000000..1fdb5880 --- /dev/null +++ b/test/tools/csql/test061.ksh @@ -0,0 +1,25 @@ +#!/bin/sh +#Test case +#create table t1(f1 int not null,f2 int,f3 int,primary key(f1)); +#create index idx1 on t1(f1) tree unique; +#It should be passed. +# +QUITFILE=${PWD}/tools/csql/quit.sql +REL_PATH=. +if [ -s "$QUITFILE" ] +then + REL_PATH=`pwd`/tools/csql +fi + +$CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/tree16.sql +if [ $? -ne 0 ] +then + exit 1; +fi +$CSQL_INSTALL_ROOT/bin/csqldump -T t1 +$CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s ${REL_PATH}/drop.sql +if [ $? -ne 0 ] +then + exit 1; +fi + diff --git a/test/tools/csql/tree16.sql b/test/tools/csql/tree16.sql new file mode 100644 index 00000000..1e9f707f --- /dev/null +++ b/test/tools/csql/tree16.sql @@ -0,0 +1,4 @@ +create table t1(f1 int not null,f2 int,f3 int,primary key(f1)); +echo create index idx1 on t1(f1) tree unique; +create index idx1 on t1(f1) tree unique; + -- 2.11.4.GIT