Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 18205 invoked from network); 17 Nov 2005 21:07:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Nov 2005 21:07:23 -0000 Received: (qmail 61937 invoked by uid 500); 17 Nov 2005 21:07:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 61917 invoked by uid 500); 17 Nov 2005 21:07:22 -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 61908 invoked by uid 99); 17 Nov 2005 21:07:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2005 13:07:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.110.154] (HELO e36.co.us.ibm.com) (32.97.110.154) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2005 13:08:56 -0800 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id jAHL6wMY022575 for ; Thu, 17 Nov 2005 16:06:58 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id jAHL8C50070694 for ; Thu, 17 Nov 2005 14:08:16 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id jAHL6ssc005144 for ; Thu, 17 Nov 2005 14:06:54 -0700 Received: from [127.0.0.1] (dyn9030145076.svl.ibm.com [9.30.145.76]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id jAHL6oX1004949 for ; Thu, 17 Nov 2005 14:06:54 -0700 Message-ID: <437CF0A2.3090507@Sourcery.Org> Date: Thu, 17 Nov 2005 13:05:38 -0800 From: Satheesh Bandaram User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: UpdateNode/DeleteNode and SYNONYM References: <437CE814.90305@debrunners.com> In-Reply-To: <437CE814.90305@debrunners.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It may be possible to differ this synonym resolution to verifyTargetTable(), but this is currently called after some cursor bind checking that expects correct target table name. If verifyTargetTable() can be performed before this cursor checking, which resolves synonyms correctly, the following code can be removed. Satheesh Daniel John Debrunner wrote: >I was fixing some code in the bind() for UpdateNode and DeleteNode for >DERBY-571 and noticed that the methods are very similar and possibly >could be combined. > >One thing that stood out is that UpdateNode has this code at the >beginning of bind() related to SYNONYMs > > // check if targetTable is a synonym > if (targetTableName != null) > { > TableName synonymTab = resolveTableToSynonym(this.targetTableName); > if (synonymTab != null) > this.targetTableName = synonymTab; > } > >DeleteNode does not have this code. > >However, both nodes call verifyTargetTable(), which also performs the >same SYNONYM lookup. > >Is the code in UpdateNode required, or is it just left over from the >implementation by mistake? > >Any ideas? >Dan. > > > > >