Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 79897 invoked from network); 25 May 2009 16:03:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 May 2009 16:03:16 -0000 Received: (qmail 62991 invoked by uid 500); 25 May 2009 15:36:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 62928 invoked by uid 500); 25 May 2009 15:36:48 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 62920 invoked by uid 99); 25 May 2009 15:36:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 15:36:48 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.82.107.6] (HELO red.amberpoint.com) (63.82.107.6) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 15:36:40 +0000 Received: from [127.0.0.1] (knoppix.edgility.com [10.10.12.170] (may be forged)) by red.amberpoint.com (8.13.8/8.13.8) with ESMTP id n4PFaIqT024918 for ; Mon, 25 May 2009 08:36:19 -0700 Message-ID: <4A1ABAF2.4040903@amberpoint.com> Date: Mon, 25 May 2009 08:36:18 -0700 From: Bryan Pendleton User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Bug in Derby 10.5.1.1 or misuse ? References: <4A1AB036.2030703@gmail.com> In-Reply-To: <4A1AB036.2030703@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > I can't see what I am doing wrong, but I am not an SQL expert. So, I am > doing something wrong or is there a problem with Derby 10.5.1.1? Looks like a bug in Derby to me, unfortunately. It fails for me on the current Derby trunk, with this SQL submitted to the ij tool: drop table types; drop table methods; drop table methodParameters; CREATE TABLE types ( id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, name VARCHAR(128) NOT NULL UNIQUE, shortName VARCHAR(64) NOT NULL ); create table methods (id int primary key generated always as identity); CREATE TABLE methodParameters ( method INT REFERENCES methods (id), position INT, parameter INT REFERENCES types (id) ); prepare p as 'SELECT method, COUNT(method) FROM methodParameters INNER JOIN types ON parameter = id WHERE name IN (?) GROUP BY method HAVING COUNT(method) >= ?'; If you could please file an issue in JIRA, that would be great. http://db.apache.org/derby/DerbyBugGuidelines.html I think this issue is quite possibly related to the work we did for DERBY-2526, so perhaps you could mention that as a possibility in the problem report. thanks, bryan