db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Commented: (DERBY-18) Exposed name matching has bugs when the column name is qualified with a schema name.
Date Tue, 25 Jan 2005 19:56:45 GMT
Hash: SHA1

Shreyas Kaushik (JIRA) wrote:
>      [
http://issues.apache.org/jira/browse/DERBY-18?page=comments#action_58008 ]
> Shreyas Kaushik commented on DERBY-18:
> --------------------------------------
> set current schema app;
> create table t1(int c1 varchar(10));
> create schema s1;
> create table s1.t1(id1 int, d2 varchar(10));
> select * from t1, app.t1;  ---> This fails, should succeed.
> Internally table names are handled correctly but the above problem
occurs because of the equals() method in Tablename.java.
> Here the follwoing piece of code
> else if ((schemaName == null) ||
> 				 (otherTableName.getSchemaName() == null))
> 		{
> 			return tableName.equals(otherTableName.getTableName());
> 	     }
> causes the above error to occur. In this if either of the schema name
is null, only the table names are compared and hence the error for the
above statement.
> Should the equals method implementation be changed to take of this?
>   or
> Should we set the tables that have null schemas to the current schema
or something along these lines?

Any implicit schema always means the current schema. At bind time the
query node should ensure that it converts implicit schema names to the
current schema. This is handled by the
QueryTreeNode.getSchemaDescriptor() methods. Most likely this is
occuring but the node's TableName is not being updated.

Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


View raw message