Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 20957 invoked from network); 4 Dec 2009 10:52:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 10:52:43 -0000 Received: (qmail 22966 invoked by uid 500); 4 Dec 2009 10:52:43 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 22888 invoked by uid 500); 4 Dec 2009 10:52:42 -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 22880 invoked by uid 99); 4 Dec 2009 10:52:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 10:52:42 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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, 04 Dec 2009 10:52:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B8ACB234C1EE for ; Fri, 4 Dec 2009 02:52:20 -0800 (PST) Message-ID: <744796195.1259923940755.JavaMail.jira@brutus> Date: Fri, 4 Dec 2009 10:52:20 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-813) Clean up coding error in searchClauseTransitiveClosure method in PredicateList.java In-Reply-To: <1475757757.1137260740252.JavaMail.jira@ajax.apache.org> 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-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen closed DERBY-813. ------------------------------------ Resolution: Duplicate Since the parent issue is closed, and this issue is also tracked in a top-level issue (DERBY-2282), I'm closing it as a duplicate. > Clean up coding error in searchClauseTransitiveClosure method in PredicateList.java > ----------------------------------------------------------------------------------- > > Key: DERBY-813 > URL: https://issues.apache.org/jira/browse/DERBY-813 > Project: Derby > Issue Type: Sub-task > Components: SQL > Affects Versions: 10.0.2.0 > Environment: generic > Reporter: Satheesh Bandaram > Priority: Minor > > I am separating this part of the bug from DERBY-808. This part of the fix can go into 10.2 release, while I would like to submit the first part of DERBY-808 to both 10.1 and trunk branches. > Coding error in PredicateList.searchClauseTransitiveClosure. Also note, when the operands are switched, the type of the operation needs to change. For example, should change to . Current code doesn's seem to do that either. > if (left instanceof ColumnReference && right instanceof ConstantNode) > { > searchClauses.addElement(predicate); > } > else if (right instanceof ConstantNode && left instanceof ColumnReference) > { > // put the ColumnReference on the left to simplify things > bcon.swapOperands(); > searchClauses.addElement(predicate); > } > The second part of the check is incorrect. It should instead be like: > else if (left instanceof ConstantNode && right instanceof ColumnReference) > and while handling ParameterNodes. Also the swaping logic is not complete. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.