[ 
https://issues.apache.org/jira/browse/DERBY-3853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yun Lee updated DERBY-3853:
---------------------------

    Attachment: DERBY-3853-2.stat
                DERBY-3853-2.patch

Knut, I have provided a new patch with changes:

1.) make the changes on the client driver instead of on EmbedConnection;
2.) remove sqle.getNextException() when invoking assertSQLState();
3.) add fail() at the end of the try block in many places.

However,  I think it's the same safe to make change on EmbedConneciton with on 
client driver, as whatever, the test data ----EmptyMapValue, NullMapValue and 
MapMapValue ---- for testAllDataSource() has changed, :).

Wish for your check!

Also, I'm a bit strange to have found the source code of Derby doesn't follow a 
uniform style, such as '=' accompanied by space characters, and the indent for 
curly braces. Aren't they?

Yun

> 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: 10.5.0.0
>            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.

Reply via email to