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-142) ResultSetMetaData.isReadOnly() also returns wrong results
Date Fri, 07 Oct 2005 18:47:43 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the detailed info. I will take a look at what can be done to
address this. <br>
<br>
Satheesh<br>
<br>
Jean T. Anderson (JIRA) wrote:<br>
<blockquote
 cite="mid413855548.1128708952461.JavaMail.jira@ajax.apache.org"
 type="cite">
  <pre wrap="">    [ <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-142?page=comments#action_12331614">http://issues.apache.org/jira/browse/DERBY-142?page=comments#action_12331614</a>
] 

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 <a class="moz-txt-link-freetext" href="http://mail-archives.apache.org/mod_mbox/db-torque-dev/200510.mbox/%3cOFD3D00A51.B30FADD0-ONC1257093.0025F17E-C1257093.0026E38E@seitenbau.net%3e">http://mail-archives.apache.org/mod_mbox/db-torque-dev/200510.mbox/%3cOFD3D00A51.B30FADD0-ONC1257093.0025F17E-C1257093.0026E38E@seitenbau.net%3e</a>
that  this problem prevents Torque from working with Derby and the network server:

  </pre>
  <blockquote type="cite">
    <pre wrap="">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. 
    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
  <blockquote type="cite">
    <pre wrap="">ResultSetMetaData.isReadOnly() also returns wrong results
---------------------------------------------------------

         Key: DERBY-142
         URL: <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-142">http://issues.apache.org/jira/browse/DERBY-142</a>
     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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message