Derby
  1. Derby
  2. DERBY-2992

getBinaryStream returns incorrect result (truncated value) if underlying blob is deleted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.2.0, 10.3.1.4, 10.4.1.3, 10.5.3.0, 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: JDBC
    • Labels:
      None
    • Urgency:
      Normal
    • Issue & fix info:
      High Value Fix, Repro attached
    • Bug behavior facts:
      Regression, Wrong query result

      Description

      If getBinaryStream is reading a value (READ_UNCOMMITTED) and the row is deleted by another connection, a truncated value will be returned without error. I believe instead either the whole value or an IOException should occur.

      With 10.2 and higher with the repro attahed we get:
      > java TruncatedBlob
      Embedded:
      Read 32669 bytes
      0 rows in BLOBCLOB

      With 10.1
      Embedded:
      Read 40000 bytes (OK)
      0 rows in BLOBCLOB

      Note network server returns the full value for both 10.1 and 10.2 but gives a lock timeout for 10.2+. I will file a separate issue for that.

      1. derby-2992-1b-throw_exception_on_eof.diff
        6 kB
        Kristian Waagan
      2. derby-2992-1a-throw_exception_on_eof.diff
        6 kB
        Kristian Waagan
      3. TruncatedBlob.java
        2 kB
        Kathey Marsden

        Issue Links

          Activity

          Kathey Marsden created issue -
          Kathey Marsden made changes -
          Field Original Value New Value
          Attachment TruncatedBlob.java [ 12363129 ]
          Kathey Marsden made changes -
          Link This issue is part of DERBY-2034 [ DERBY-2034 ]
          Kathey Marsden made changes -
          Derby Categories [High Value Fix, Wrong query result]
          Dag H. Wanvik made changes -
          Bug behavior facts [High Value Fix, Wrong query result] [Regression]
          Dag H. Wanvik made changes -
          Bug behavior facts [Regression] [Regression, Wrong query result]
          Issue & fix info [High Value Fix]
          Rick Hillegas made changes -
          Urgency Normal
          Issue & fix info [High Value Fix] [High Value Fix, Repro attached]
          Kristian Waagan made changes -
          Kristian Waagan made changes -
          Affects Version/s 10.5.3.0 [ 12314117 ]
          Affects Version/s 10.6.0.0 [ 12313727 ]
          Issue & fix info [High Value Fix, Repro attached] [High Value Fix, Patch Available, Repro attached]
          Kristian Waagan made changes -
          Kristian Waagan made changes -
          Issue & fix info [Repro attached, Patch Available, High Value Fix] [High Value Fix, Repro attached]
          Assignee Kristian Waagan [ kristwaa ]
          Kristian Waagan made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Kristian Waagan made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4728 [ DERBY-4728 ]
          Kathey Marsden made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Mike Matrigali made changes -
          Assignee Kristian Waagan [ kristwaa ] Mike Matrigali [ mikem ]
          Mike Matrigali made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Mike Matrigali [ mikem ] Kristian Waagan [ kristwaa ]
          Fix Version/s 10.5.3.1 [ 12314182 ]
          Resolution Fixed [ 1 ]
          Kathey Marsden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12409939 ] Default workflow, editable Closed status [ 12799917 ]

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development