db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3853) Behaviour of setTypeMap() differs between embedded and client
Date Fri, 10 Apr 2009 13:56:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697807#action_12697807

Knut Anders Hatlen commented on DERBY-3853:

Hi Yun,

Thanks for the new patch! It looks good to me. I'll run some tests and commit it if I don't
find any problems.

The reason why I felt it was safer to make the changes on the client driver, was that the
changes there would be that things that failed would start working or that they would fail
with another error code. If we had made the change on the embedded driver, things that used
to work would stop working, which is worse.

But as you said, there are changes on the client side too, so we may consider writing a release
note warning users that the error code has changed. Though I'm not sure if we have bothered
release noting changes from "0A000 - not implemented" before.

You're right about the inconsistent coding style. There was a vote once where it was decided
that the Java coding conventions[1] (with some amendments that I don't remember right now)
was the recommended style for new code. It was not decided that the entire code base should
be reformatted, so we still have to live with different styles.

[1] http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

> Behaviour of setTypeMap() differs between embedded and client
> -------------------------------------------------------------
>                 Key: DERBY-3853
>                 URL: https://issues.apache.org/jira/browse/DERBY-3853
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, Newcomer
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: DERBY-3853-1.patch, DERBY-3853-1.stat, DERBY-3853-2.patch, DERBY-3853-2.stat
> On the embedded driver, Connection.setTypeMap() behaves like this (when the connection
is not closed):
>   - if the map argument is null, throw an SQLException with SQLState XJ081
>   - if the map is not null and not empty, throw an SQLException with SQLState 0A000
>   - if the map is not null and empty, do nothing
> The behaviour on the client driver is this:
>   - always throw an SQLException with SQLState 0A000
> We should try to make the two drivers behave the same way when setTypeMap() is called.
(This would also allow us to simplify some of the tests in J2EEDataSourceTest).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message