Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 26599 invoked from network); 22 May 2009 23:41:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 23:41:06 -0000 Received: (qmail 55006 invoked by uid 500); 22 May 2009 23:41:17 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 54954 invoked by uid 500); 22 May 2009 23:41:16 -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 54946 invoked by uid 99); 22 May 2009 23:41:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 23:41:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 23:41:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C181B29A0015 for ; Fri, 22 May 2009 16:40:45 -0700 (PDT) Message-ID: <1157247001.1243035645791.JavaMail.jira@brutus> Date: Fri, 22 May 2009 16:40:45 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4230) DatabaseMetaData.getColumns() returns extra column from view with group by and expression in SELECT list In-Reply-To: <1311808867.1242332265558.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden updated DERBY-4230: ---------------------------------- Attachment: derby-4230_diff2.txt Here is a follow up patch for this issue . derby-4230_diff2.txt. It uses colInfos.length for the loop as Knut orignally suggested, making the assumption that the generated columns come at the end. Added a comment and an assertion if we are wrong in this assumption and hit a generated column in the expected visible range. I ran lang.ViewsTest but haven't run the full regression suite yet. > DatabaseMetaData.getColumns() returns extra column from view with group by and expression in SELECT list > --------------------------------------------------------------------------------------------------------- > > Key: DERBY-4230 > URL: https://issues.apache.org/jira/browse/DERBY-4230 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.3.2.1 > Reporter: Kathey Marsden > Assignee: Kathey Marsden > Attachments: create.sql, DERBY-4230_diff.txt, derby-4230_diff2.txt, DERBY-4230_preview_diff.txt, ViewTest.java > > > DatabaseMetaData.getColumns() returns an extra column for a view with a group by and an expression in the select list. I will attach the reproduction. Run the script create.sql and then the program ViewTest. > This is a regression in version 10.3, It ran ok on latest on the 10.1 and 10.2 branches. > The ResultSetMetaData appears to return the correct number of columns when you select from the view, but it would be nice to add a regression test for that too. > See discussion on derby-dev. > http://www.nabble.com/extra-column-in-DatabaseMetaData.getColumns()-with-group-by-in-view-td23545576.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.