db-derby-dev mailing list archives

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

I think we need to understand that we are using String for TableName and not as an object
of type TableName.java. Hence associating a schema with a table name which would otherwise
have been possible(TableName.setSchemaName) cannot happen, is a problem.

Secondly irrespective of whether a user gives a schema name (prefixes or not) we need to store
the schema name(after clearly identifying the schema name), for every table name and cannot
assume it to be NULL, else we get in problems like this.


1. either change from String tableName to TableName tableName.

2. build a tableName object(of type TableName object) from the String and try to get handle
to schema name (using the select query String as well).

Note : the basic objective of either approach is to get handle to a schema name as and when
it is required.

1. is complex and may involve lot of changes wheras 2. is fairly simple.
If we can achive using 2 that will be better.

> 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