db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: UpdateNode/DeleteNode and SYNONYM
Date Thu, 17 Nov 2005 21:05:38 GMT
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.


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?

View raw message