db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Innes (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6923) Passing a ClientClob or ClientBlob from another connection to an INSERT statement results in 'null' being written.
Date Sat, 25 Feb 2017 20:59:44 GMT

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

Gordon Innes commented on DERBY-6923:
-------------------------------------

Thanks for the detailed response. The delayed transfer of the data you describe certainly
fits with the behaviour I'm seeing. Manually materializing the objects is a good workaround.

The original HA-JDBC code that first found the issue with is designed to synchronise the databases
without knowledge of the schema. It uses getObject and setObject to set up batches of inserts.
So it will need to introduce special cases for Clob and Blob objects.

I was wondering if the issue could be because the connections were on separate NetworkServer
instances. As a quick test, I modified the DerbyNetworkOnly example to have both connections
point to the same NetworkServer and the behaviour is still the same, i.e. null is written
when using 'non-materialized' objects.

> Passing a ClientClob or ClientBlob from another connection to an INSERT statement results
in 'null' being written.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6923
>                 URL: https://issues.apache.org/jira/browse/DERBY-6923
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, Network Server
>    Affects Versions: 10.13.1.1
>         Environment: Java 8
> MacOS
> Windows
>            Reporter: Gordon Innes
>            Priority: Critical
>         Attachments: DerbyEmbeddedOnly.java, DerbyNetworkOnly.java, DerbyNetworkRead.java,
DerbyNetworkWrite.java
>
>
> When assigning a Blob or Clob from a ResultSet to a PreparedStatement parameter on a
second connection, null is written to the column instead.
> Attached the same example using Embedded->Embedded, Embedded->Network, Network->Embedded
and Network->Network.
> Only the Network->Network example exhibits the fault.
> Originally discovered in HA-JDBC's sync code with 2 derby instances on Windows. Example
were tested using MacOS. Both were running on Oracle Java 8 VMs.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message