db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Resolved: (DERBY-189) ResultSetMetaData.getSchemaName and ResultSetMetaData.isWritable donot return correct values
Date Thu, 12 May 2005 16:02:07 GMT
     [ http://issues.apache.org/jira/browse/DERBY-189?page=all ]
     
Daniel John Debrunner resolved DERBY-189:
-----------------------------------------

     Resolution: Fixed
    Fix Version: 10.1.0.0

svn revision 169838

I (Mamta) have a new patch for this bug which also fixes the problem you
brought up with sql select * from a.t as X. The fix for this required
change in impl.sql.compile.FromBaseTable's method genResultColList().
I changed the code such that we set the TableDescriptor on the
ColumnDescriptor instance. This TableDescriptor is later used by
ResultColumn.getTableName to get the base table name of the column. In
addition to that, I changed ColumnReference.getSourceTableName and
ColumnReference.getSourceSchemaName so that they don't look at the
user supplied correlation name (if any) to fetch the base table/schema
name.

> ResultSetMetaData.getSchemaName and ResultSetMetaData.isWritable donot return correct
values
> --------------------------------------------------------------------------------------------
>
>          Key: DERBY-189
>          URL: http://issues.apache.org/jira/browse/DERBY-189
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.1.0.0
>     Reporter: Mamta A. Satoor
>     Assignee: Mamta A. Satoor
>      Fix For: 10.1.0.0

>
> ResultSetMetaData among other methods has isWritable() and getSchemaName() and Derby
engine does not return correct values for them. This needs to be fixed in order to support
updatable resultset apis in Network Server mode since the client driver relies on these 2
methods.
> Derby Net Client and JCC driver rely on getSchemanName method to construct the correct
"update where current of sql" for an updatRow. For eg, if the user is in say schema s1 and
the updatable resultset is issued on a table from schema s2 with the sql "select c11 from
s2.t1 for update". Currenly, getSchemaName returns null and hence, the client code constructs
a sql like "update t1 ... where current of ...". ie the update is being issued against table
t1 in schema s1. getSchemaName should return s2, so the driver can correctly genereat sql
as "update s2.t1 ... where current of ...".
> In addition, the client code lets a user issue an updateXXX on a column only if the column
is writable and it determines that by looking at the return value of isWritable(). Derby engine
currently always returns false for this method and because of that, updateXXX fails in Network
Server mode. Derby should return true for the columns which can be updated in the given resultset.
For eg for "select c11, c12 from t1 for update of c11", isWritable should return true for
c11 and false for c12.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message