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: [jira] Commented: (DERBY-13) Quoted names with embedded period mishandled in from list
Date Tue, 28 Dec 2004 19:46:22 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
If we follow Dan's suggestion of using TableName for correlation names,
then the allTableName here should not be a string... If a correlation
name is "S1.T1", then the tableName part of TableName is S1.T1 and
schema name is NULL. If a correlation name s1.t1, then tableName would
be S1 and schemaName is T1. We would then compare this allTableName,
which is a TableName instance, with fromTable's TableName, using it's
equals() method.<br>
Shreyas Kaushik (JIRA) wrote:<br>
<blockquote cite="mid312627432.1104243675389.JavaMail.apache@nagoya"
  <pre wrap="">     [ <a class="moz-txt-link-freetext" href="http://nagoya.apache.org/jira/browse/DERBY-13?page=comments#action_57085">http://nagoya.apache.org/jira/browse/DERBY-13?page=comments#action_57085</a>
Shreyas Kaushik commented on DERBY-13:

In response to Sateesh's comment:

Here in this method the allTableName is just a String and we cannot know the schema name for
that table. Only for the table in the from list can the schema be known. So it is still a
compile / bind time issue.

  <blockquote type="cite">
    <pre wrap="">Quoted names with embedded period mishandled in from list

         Key: DERBY-13
         URL: <a class="moz-txt-link-freetext" href="http://nagoya.apache.org/jira/browse/DERBY-13">http://nagoya.apache.org/jira/browse/DERBY-13</a>
     Project: Derby
        Type: Bug
  Components: SQL
    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 
  <pre wrap=""><!---->

View raw message