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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1, 10.6.1.0
    • 10.4.2.1, 10.5.3.1, 10.6.1.0
    • JDBC
    • None
    • 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. java-deadlock.txt
          12 kB
          Kristian Waagan
        2. derby-4102-1a.stat
          0.1 kB
          Kristian Waagan
        3. derby-4102-1a.diff
          6 kB
          Kristian Waagan
        4. CastExc.java
          0.6 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: