From 72412031984d874efb92bc27a4b8d7b851cc8e81 Mon Sep 17 00:00:00 2001 From: prabatuty Date: Sun, 22 May 2011 17:15:55 +0000 Subject: [PATCH] test script for trie index --- test/sql/DDL/create_trie.sql | 1 + test/sql/DDL/exp.test005.ksh | 21 +++++++++++++++++++++ test/sql/DDL/test005.ksh | 26 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 test/sql/DDL/create_trie.sql create mode 100644 test/sql/DDL/exp.test005.ksh create mode 100755 test/sql/DDL/test005.ksh diff --git a/test/sql/DDL/create_trie.sql b/test/sql/DDL/create_trie.sql new file mode 100644 index 00000000..3770f531 --- /dev/null +++ b/test/sql/DDL/create_trie.sql @@ -0,0 +1 @@ +create index idx on t1 (f1) trie; diff --git a/test/sql/DDL/exp.test005.ksh b/test/sql/DDL/exp.test005.ksh new file mode 100644 index 00000000..37b6a3dc --- /dev/null +++ b/test/sql/DDL/exp.test005.ksh @@ -0,0 +1,21 @@ +Statement Executed + + idx + 0 + Trie Index + + 1 + 0 + + + + 1 + 4 + + + 1 + 3 + + + +Statement Executed diff --git a/test/sql/DDL/test005.ksh b/test/sql/DDL/test005.ksh new file mode 100755 index 00000000..383c79ab --- /dev/null +++ b/test/sql/DDL/test005.ksh @@ -0,0 +1,26 @@ +#!/bin/ksh +# create trie index with existing records +# +QUITFILE=${PWD}/sql/DDL/drop.sql +REL_PATH=. +if [ -s "$QUITFILE" ] +then +REL_PATH=`pwd`/sql/DDL +fi + +echo "drop table t1;">>${REL_PATH}/dropt1.sql + +echo "create table t1 ( f1 int not null);" >${REL_PATH}/createt1.sql +$CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/createt1.sql >/dev/null 2>&1 +echo "insert into t1 values (10);" >${REL_PATH}/insertt1.sql +echo "insert into t1 values (100);" >>${REL_PATH}/insertt1.sql +echo "insert into t1 values (1000);" >>${REL_PATH}/insertt1.sql +$CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/insertt1.sql >/dev/null 2>&1 + +$CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/create_trie.sql +$CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -I idx +$CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/dropt1.sql +rm -f ${REL_PATH}/dropt1.sql +rm -f ${REL_PATH}/createt1.sql +exit 0; + -- 2.11.4.GIT