db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3741) SQL LENGTH function materializes CLOB into memory
Date Thu, 24 Jul 2008 15:25:31 GMT

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

Kathey Marsden commented on DERBY-3741:
---------------------------------------

On the code I just have one comment.  Should we check to see if the stream is instanceof ObjectInput
as well as Resettable since we cast it?  I realize SQLBinary has the same problem.

I ran the test with 16M heap and it fails.  It looks like we are  materializing the lob for
 client. (I thought we had fixed that #:(.   Perhaps you could disable this part of the test
for client and file a bug that the client is materializing the lob into memory.  I noticed
BlobMemTest with 16M is failing with a similar error (It passed  a few weeks ago), so it looks
like a regression.  Here is the ClobMemTest failure.   

There was 1 error:
1) testClobLength(org.apache.derbyTesting.functionTests.tests.memory.ClobMemTest)java.sql.SQLException:
Attempt to fully
 materialize lob data that is too large for the JVM.  The connection has been terminated.
        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46)
        at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:362)
        at org.apache.derby.client.am.ResultSet.next(ResultSet.java:281)
        at org.apache.derbyTesting.functionTests.tests.memory.ClobMemTest.testClobLength(ClobMemTest.java:116)
        at org.apache.derbyTesting.functionTests.tests.memory.ClobMemTest.testClobLength(ClobMemTest.java:171)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:104)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: org.apache.derby.client.am.DisconnectException: Attempt to fully materialize lob
data that is too large for t
he JVM.  The connection has been terminated.
        at org.apache.derby.client.net.NetStatementReply.copyEXTDTA(NetStatementReply.java:1528)
        at org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply(NetResultSetReply.java:143)
        at org.apache.derby.client.net.NetResultSetReply.readFetch(NetResultSetReply.java:42)
        at org.apache.derby.client.net.ResultSetReply.readFetch(ResultSetReply.java:41)
        at org.apache.derby.client.net.NetResultSet.readFetch_(NetResultSet.java:206)
        at org.apache.derby.client.am.ResultSet.flowFetch(ResultSet.java:4275)
        at org.apache.derby.client.net.NetCursor.getMoreData_(NetCursor.java:1243)
        at org.apache.derby.client.am.Cursor.stepNext(Cursor.java:176)
        at org.apache.derby.client.am.Cursor.next(Cursor.java:195)
        at org.apache.derby.client.am.ResultSet.nextX(ResultSet.java:302)
        at org.apache.derby.client.am.ResultSet.next(ResultSet.java:272)
        ... 38 more
Caused by: java.lang.OutOfMemoryError
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:116)
        at org.apache.derby.client.net.Reply.getData(Reply.java:787)
        at org.apache.derby.client.net.NetStatementReply.copyEXTDTA(NetStatementReply.java:1520)
        ... 48 more

FAILURES!!!

> SQL LENGTH function materializes CLOB into memory
> -------------------------------------------------
>
>                 Key: DERBY-3741
>                 URL: https://issues.apache.org/jira/browse/DERBY-3741
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.3.0, 10.4.1.3, 10.5.0.0
>            Reporter: Kathey Marsden
>            Assignee: Suran Jayathilaka
>         Attachments: ClobMemTest.java, derby-3741-1.diff, LargeLengthClob.zip
>
>
> Similar to DERBY-3732, the SQL LENGTH function also materializes CLOB's into memory.
 See attached repro.

-- 
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