db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen (JIRA) <j...@apache.org>
Subject [jira] Updated: (DERBY-3098) LOB locks are not released after free().
Date Thu, 04 Oct 2007 13:00:55 GMT

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

Øystein Grøvlen updated DERBY-3098:
-----------------------------------

    Attachment: derby-3098fix+tests.diff

Attached is new patch, derby-3098fix+tests.diff, that fixes the double
locking problem for Clobs and add tests.

EmbedClob no longer explicity initializes the stream since it will be
done when the StoreStreamClob object is created.  I also added a check
in OverflowInputStream to ensure that should a stream be initialized
several times, locking will only be peformed the first time.

Tests has also been added. (Since free() is a JDBC 4 method, most test
cases had to be added to the JDBC 4 test suite, but I also added a
test case to BlobClob4Blob to check that locks are released at commit
if free() is not called.)

With this patch, jdbc4/ClobTest will fail with client/server since it
turns out that when Clob.free() is called on the client, this is not
propagated to the server, and the server-side Clob is not freed until
commit.  I will file a separate issue for that.



> LOB locks are not released after free().
> ----------------------------------------
>
>                 Key: DERBY-3098
>                 URL: https://issues.apache.org/jira/browse/DERBY-3098
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0, 10.3.1.4
>         Environment: Any
>            Reporter: Øystein Grøvlen
>            Assignee: Øystein Grøvlen
>         Attachments: derby-3098fix+tests.diff, derby-3098fix.diff
>
>
> When getBlob/getClob is called on the ResultSet, the current row is
> locked if the JDBC driver does not cache the entire LOB value in
> memory.  This is done to prevent the Blob/Clob object from being
> changed.  Until now, this lock has been held to the end of the
> transaction.
> JDBC4 introduced free() methods for the Blob/Clob class.  The locking
> should be changed so that the locks is releases when the Blob/Clob
> object is freed.

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


Mime
View raw message