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

Rick Hillegas updated DERBY-4959:
---------------------------------

    Attachment: derby-4959-01-aa-detectNulls.diff

Attaching derby-4959-01-aa-detectNulls.diff. This patch percolates nulls up the 
call stack when the server is called to wrap a stream around a LOB. I will run 
regression tests.


Touches the following files:

---------

M      java/drda/org/apache/derby/impl/drda/EXTDTAInputStream.java

The method which wraps streams around LOB output parameters now detects when 
the underlying LOB is null.

---------

M      
java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/CallableStatementTest.java

New test case for this bug.


> NPE in network server trying to return a null LOB as a procedure output arg
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-4959
>                 URL: https://issues.apache.org/jira/browse/DERBY-4959
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Server, SQL
>    Affects Versions: 10.8.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-4959-01-aa-detectNulls.diff, zz.java
>
>
> The server stumbles on the following error if you try to return a null LOB as 
> a procedure output arg:
> java.lang.NullPointerException
>       at 
> org.apache.derby.impl.drda.EXTDTAInputStream.length(EXTDTAInputStream.java:280)
>       at 
> org.apache.derby.impl.drda.EXTDTAInputStream.isEmptyStream(EXTDTAInputStream.java:274)
>       at 
> org.apache.derby.impl.drda.DRDAConnThread.writeFdocaVal(DRDAConnThread.java:7930)
>       at 
> org.apache.derby.impl.drda.DRDAConnThread.writeFDODTA(DRDAConnThread.java:7183)
>       at 
> org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.java:4179)
>       at 
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:1021)
>       at 
> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:294)
> This kills the connection. I will attach a repro.

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