Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4102

Assert failure or ClassCastException in EmbedBlob when retrieving BLOB >= 32K

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.1.0, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1, 10.6.1.0
    • Fix Version/s: 10.4.2.1, 10.5.3.1, 10.6.1.0
    • Component/s: JDBC
    • Labels:
      None
    • Urgency:
      Normal

      Description

      The code below results in an assert error (with sane jars) or a ClassCastException (with insane jars):

      PreparedStatement ps = c.prepareStatement("values cast(? as blob)");
      int len = 32 * 1024;
      ps.setBinaryStream(1, new ByteArrayInputStream(new byte[len]), len);
      ResultSet rs = ps.executeQuery();
      while (rs.next())

      { rs.getBlob(1); }

      If len < 32K there is no error.

        Attachments

        1. CastExc.java
          0.6 kB
          Knut Anders Hatlen
        2. derby-4102-1a.diff
          6 kB
          Kristian Waagan
        3. derby-4102-1a.stat
          0.1 kB
          Kristian Waagan
        4. java-deadlock.txt
          12 kB
          Kristian Waagan

          Issue Links

            Activity

              People

              • Assignee:
                kristwaa Kristian Waagan
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: