db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Post (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-13) Quoted names with embedded period mishandled in from list
Date Wed, 01 Dec 2004 19:06:23 GMT
     [ http://nagoya.apache.org/jira/browse/DERBY-13?page=comments#action_56067 ]
Rick Post commented on DERBY-13:

I think that the proposed patch is either incorrect or incomplete.

1. There are two 'equals' methods in Tablename.java: one takes only a table name argument
and the other takes both table name and schema name arguments. Don't they both need to be

2. The proposed change to the first 'equals' method in  Tablename.java returns false if the
argument table name is null. But the comment block at the beginning of the method states that
'TableNames are equal if their both their schemaNames and tableNames are
	 * equal, or if this node's full table name is null'. If this comment is correct then 'true'
should be returned if 'this nodes full table name is null' whether the argument is null or
not. If this comment is not correct then it should be corrected. Since the same comment appears
before the second 'equals' method the second method will need to be modified to reflect the
same business rule.
 before the 

> Quoted names with embedded period mishandled in from list
> ---------------------------------------------------------
>          Key: DERBY-13
>          URL: http://nagoya.apache.org/jira/browse/DERBY-13
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions:
>     Reporter: Ramandeep Kaur
>     Priority: Minor
>  Attachments: Derby-13.patch
> Opening this bug on behalf of Satheesh Bandaram
> ---------------------------------------------------------
> The compiler mishandles quoted names with embedded periods when 
> checking uniqueness of table names in the from list of a 
> SELECT. Consider the following SQL:
>   create table "S1.T1" (id int not null primary key, d1 int);
>   create schema s1;
>   create table s1.t1 (id int not null primary key, d2 int);
>   select * from s1.t1, "S1.T1" where s1.t1.id = "S1.T1".id;
> Derby throws an error on the final SELECT statement:
> "ERROR 42X09: The table or alias name 'S1.T1' is used more than 
> once in the FROM list". However s1.t1 and "S1.T1" are different 
> tables.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message