Derby
  1. Derby
  2. DERBY-5162

CLOB INOUT arg set to NULL by procedure does not preserve NULL value when re-invoked

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: JDBC, SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Wrong query result

      Description

      If a procedure sets an INOUT CLOB arg to NULL and is then re-invoked, the NULL is not preserved. Instead, the procedure sees the same CLOB that it saw in the last invocation. This bug was disclosed during the testing of the fix for DERBY-2515. I will attach a repro.

      1. derby-5162-01-aa-restoreToNull.diff
        0.4 kB
        Rick Hillegas
      2. z.java
        6 kB
        Rick Hillegas

        Issue Links

          Activity

          Hide
          Rick Hillegas added a comment -

          Attaching z.java, a program which demonstrates the bug.

          Show
          Rick Hillegas added a comment - Attaching z.java, a program which demonstrates the bug.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-5162-01-aa-restoreToNull.diff. This is a 1-line patch to SQLChar.restoreToNull() which fixes this bug. I will run regression tests. I don't propose to write a separate regression test for this problem. This fix should be covered by the more exhaustive test supplied in derby-2515-01-ac-copyINOUTreturnValues.diff.

          Touches the following file:

          M java/engine/org/apache/derby/iapi/types/SQLChar.java

          Show
          Rick Hillegas added a comment - Attaching derby-5162-01-aa-restoreToNull.diff. This is a 1-line patch to SQLChar.restoreToNull() which fixes this bug. I will run regression tests. I don't propose to write a separate regression test for this problem. This fix should be covered by the more exhaustive test supplied in derby-2515-01-ac-copyINOUTreturnValues.diff. Touches the following file: M java/engine/org/apache/derby/iapi/types/SQLChar.java
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly except for known Heisenbugs. Committed derby-5162-01-aa-restoreToNull.diff at subversion revision 1086798.

          Show
          Rick Hillegas added a comment - Tests passed cleanly except for known Heisenbugs. Committed derby-5162-01-aa-restoreToNull.diff at subversion revision 1086798.

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development