Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCADAC81A for ; Thu, 18 Jul 2013 17:34:53 +0000 (UTC) Received: (qmail 37052 invoked by uid 500); 18 Jul 2013 17:34:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 36992 invoked by uid 500); 18 Jul 2013 17:34:49 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 36976 invoked by uid 99); 18 Jul 2013 17:34:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jul 2013 17:34:49 +0000 Date: Thu, 18 Jul 2013 17:34:49 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-1669) DatabaseMetaData.getIndexInfo() does not differentiate between generated and real indexes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-1669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor updated DERBY-1669: ----------------------------------- Labels: derby_triage10_11 (was: ) > DatabaseMetaData.getIndexInfo() does not differentiate between generated and real indexes > ----------------------------------------------------------------------------------------- > > Key: DERBY-1669 > URL: https://issues.apache.org/jira/browse/DERBY-1669 > Project: Derby > Issue Type: Improvement > Components: JDBC > Affects Versions: 10.1.3.1 > Environment: Windows 2003 Server > Reporter: Jorg Janke > Labels: derby_triage10_11 > > In Derby, I cannot distinguish what a "real" index is - all have TYPE=3 (= other) - all other databases distinguishes correctly between Type=0 (statistic) and TYPE=1 (normal). It is easy to be replicated with any table with a PK and an index. Derby lists the internal indexes for supporting constraints (name starting with SQL...) and the real indexes without making a difference. > Example: > CREATE TABLE AD_COLUMN > ( > AD_COLUMN_ID DECIMAL(10) NOT NULL > ) > / > ALTER TABLE AD_COLUMN > ADD CONSTRAINT AD_COLUMN_KEY > PRIMARY KEY (AD_COLUMN_ID) > / > CREATE TABLE AD_ACCESSLOG > ( > AD_ACCESSLOG_ID DECIMAL(10) NOT NULL, > AD_CLIENT_ID DECIMAL(10) NOT NULL, > AD_COLUMN_ID DECIMAL(10) NULL, > CONSTRAINT ADCOLUMN_ADACCESSLOG > FOREIGN KEY (AD_COLUMN_ID) > REFERENCES AD_COLUMN (AD_COLUMN_ID), > ) > / > CREATE INDEX AD_ACCESSLOGTEST > ON AD_ACCESSLOG(AD_CLIENT_ID) > / > ALTER TABLE AD_ACCESSLOG > ADD CONSTRAINT AD_ACCESSLOG_KEY > PRIMARY KEY (AD_ACCESSLOG_ID) > / > Dump pf the ResultSet of DatabaseMetaData.getIndexInfo() > 0: , TABLE_CAT=, TABLE_SCHEM=COMPIERE, > TABLE_NAME=AD_ACCESSLOG, NON_UNIQUE=0, INDEX_QUALIFIER=, > INDEX_NAME=SQL060709062929330, TYPE=3, ORDINAL_POSITION=1, > COLUMN_NAME=AD_ACCESSLOG_ID, ASC_OR_DESC=A, CARDINALITY=null, > PAGES=null, FILTER_CONDITION=null > 1: , TABLE_CAT=, TABLE_SCHEM=COMPIERE, > TABLE_NAME=AD_ACCESSLOG, NON_UNIQUE=1, INDEX_QUALIFIER=, > INDEX_NAME=AD_ACCESSLOGTEST, TYPE=3, ORDINAL_POSITION=1, > COLUMN_NAME=AD_CLIENT_ID, ASC_OR_DESC=A, CARDINALITY=null, > PAGES=null, FILTER_CONDITION=null > 2: , TABLE_CAT=, TABLE_SCHEM=COMPIERE, > TABLE_NAME=AD_ACCESSLOG, NON_UNIQUE=1, INDEX_QUALIFIER=, > INDEX_NAME=SQL060716064852400, TYPE=3, ORDINAL_POSITION=1, > COLUMN_NAME=AD_COLUMN_ID, ASC_OR_DESC=A, CARDINALITY=null, > PAGES=null, FILTER_CONDITION=null > Row #0 is the Primary Key > Row #2 is the Index > Row #3 is the Foreign Key > Issue: I cannot distinguish what a "real" index is - all have TYPE=3 (= other) - other databases distiguish correctly between > Type=0 (statistic) and TYPE=1 (normal) > The bug: Row #1 should have TYPE=1 > Unfortunately this puts our project to make Compiere available on Derby on hold. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira