db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francois Orsini (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-947) Miscellaneous PreparedStatement methods added by JDBC4
Date Fri, 10 Mar 2006 04:03:40 GMT
    [ http://issues.apache.org/jira/browse/DERBY-947?page=comments#action_12369786 ] 

Francois Orsini commented on DERBY-947:

Knut, thanks for the review.

Good catch - I actually followed some logic which is there all accross the JDBC 4 tests, such

        } catch(SQLException e) {
            if(SQLState.NOT_IMPLEMENTED.equals (e.getSQLState())) {
                System.out.println("Unexpected SQLException"+e);

which is exposing the same issue...Also I believe the equal expression above should be reversed
- it is evaluated to false right now everytime in both client and engine modes...I will fill
in a separate JIRA for this (it is independent of the scope of the changes for this JIRA).

Interestingly enough, the SQL state on the client driver is not always being set - for instance,
logic in

do not set the sql state upon throwing new sql exceptions - hence the following logic below,
throw new SqlException(agent_.logWriter_, "Invalid maxFieldSize value: " + max);

will yield to 'null' when retrieving the sql state of a raised exception via SQLException.getSQLState(),
hence making it impossible to write a JDBC application which relies on sql state for the client/server
mode - we don't have this problem with the embedded driver...This is already reported as part
of JIRA-254 which is supposed to address this issue as well.

I have changed the code to use a sql exception util method in ExceptionUtil class from the
shared package to extract the 5 chars sql state out of the message identifier (like embedded
does and client should do) - interestingly enough the logic to extract the state our of the
msg id is duplicated in trunk\java\engine\org\apache\derby\iapi\error\StandardException.java
but it is a different problem and not in the scope of this JIRA.

> Miscellaneous PreparedStatement methods added by JDBC4
> ------------------------------------------------------
>          Key: DERBY-947
>          URL: http://issues.apache.org/jira/browse/DERBY-947
>      Project: Derby
>         Type: New Feature
>   Components: JDBC
>     Reporter: Rick Hillegas
>     Assignee: Francois Orsini
>      Fix For:
>  Attachments: DERBY-947-v1.diff, DERBY-947-v1.stat, DERBY-947-v2.stat
> As described in the JDBC 4 spec sections 13.2 and 3.1.
> This involves building support for JDBC4 methods added to PreparedStatement and not addressed
by other JIRAs: isPoolable() and setPoolable().

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message