db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean T. Anderson (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-142) ResultSetMetaData.isReadOnly() also returns wrong results
Date Fri, 07 Oct 2005 18:15:52 GMT
    [ http://issues.apache.org/jira/browse/DERBY-142?page=comments#action_12331614 ] 

Jean T. Anderson commented on DERBY-142:
----------------------------------------

I attached a new test case, DerbyTest142.java, based on db-derby-10.1.1.0-bin/demo/simple/SimpleApp.java
that demonstrates the problem with the Derby 
Network Client (Derby 10.1.1.0). You can compile the app to run in embedded mode or in Derby
Network Client mode. 

The output for the embedded run shows that the ID and NAME columns are writeable:

[jta@gertie3 DERBY-142]$ java -Dderby.system.home=$DERBY_SYSTEM_HOME DerbyTest142
DerbyTest142 starting in embedded mode.
Loaded the appropriate driver.
Connected to and created database test
Created table readonlytest
ID column is writeable
Name column is writeable
Dropped table readonlytest
Closed result set and statement
Committed transaction and closed connection
Database shut down normally
DerbyTest142 finished

The output for the Derby Network Client run shows that the columns are readonly:

[jta@gertie3 DERBY-142]$ java -Dderby.system.home=$DERBY_SYSTEM_HOME DerbyTest142
DerbyTest142 starting in Derby Network Client mode.
Loaded the appropriate driver.
Connected to and created database test
Created table readonlytest
ID column is readonly
Name column is readonly
Dropped table readonlytest
Closed result set and statement
Committed transaction and closed connection
DerbyTest142 finished

Thomas Fischer explained in http://mail-archives.apache.org/mod_mbox/db-torque-dev/200510.mbox/%3cOFD3D00A51.B30FADD0-ONC1257093.0025F17E-C1257093.0026E38E@seitenbau.net%3e
that  this problem prevents Torque from working with Derby and the network server:

> The problem was that the network driver in the meta-info
> declared all columns to be read-only, which causes a library used
> internally in Torque (village) to refuse to write any datasets into the
> table. The problem is described in the Bug DERBY-142 in Derby's Jira.
>
> However, in future releases of Torque, it is quite probable that village is
> removed, so this will not be problematic any longer. 


> ResultSetMetaData.isReadOnly() also returns wrong results
> ---------------------------------------------------------
>
>          Key: DERBY-142
>          URL: http://issues.apache.org/jira/browse/DERBY-142
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>     Versions: 10.0.2.1
>  Environment: Using DB2 universal driver with standalone derby server
>     Reporter: Thomas Fischer
>  Attachments: DerbyTest.java, DerbyTest142.java
>
> ResultSetMetaData.isReadOnly() always returns true, even when writing to the table is
possible.  
> The JDBC 2.0 spec says: "ResultSetMetaData.isReadOnly() : Indicates whether the designated
column is definitely not writable.", so the method should return false for a table.
> I will attach a testcase for this behaviour.

-- 
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