|
This patch makes a call to connection.addLobMapping to add entry in connection. Once an entry is added EmbeddedConnection takes care of calling free method hence clearing file.
please see the description of modified files java/engine/org/apache/derby/impl/jdbc/EmbedClob.java added call to Connection.addLobMapping in constructors. moved checking for closed connection before check for valid flag in checkValidity method. This ensures that if the clob is freed because of closed connection proper sql code is set in SQLException. java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClobStoredProcedureTest.java Modified tests to get new value for locators. As the Clob now add itself to the connection stored procedure will be getting different value for locator. java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java If a clob is accessed after commit or after free SQLException gets a SSQLState of XJ217. Updated testClobAfterCommit to check for it. fixed conflicts.
I have run jdbcapi/BlobClob4BlobTest after fixing the conflicts. I am running all suites will post about the result after its done. suites.All without any problem it can be considered for review/commit
Patch reviewed and found ok.
Committed revision 546881. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DERBY-2729introduces code required to cleanup the blob and clob during commit/rollback or when connection is closed. The only missing link for clob is to add an entry in EmbeddedConnection so that free method is called on EmbedClob.