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

Returning ByteArrayInputStream from ResultSet is not appropriate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.2.1.6
    • Network Client
    • None

    Description

      Point where it is not appropriate :

      1: Compatibility

      The InputStream returned from result set is closed when other getXXXX method was called .
      http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html

      However closing ByteArrayInputStream have no effect at all .
      http://java.sun.com/j2se/1.5.0/docs/api/java/io/ByteArrayInputStream.html#close()

      It seems intended that closable InputStream was returned from result set .
      If ByteArrayInputStream was returned from result set , the stream cannot be closed,
      and compatibility would be lost .

      2: Performance of program
      Information inputted from ByteArrayInputStream needs to be expanded to memory as byte[] object .

      If large byte[] object was created for each ByteArrayInputStream object ,
      program will run in bad performance .

      // I think problem is when information typed as LOB was retrieved from ResultSet .
      // Because such informations typed as LOB tend to be large amount .

      Attachments

        1. DERBY-609.patch
          15 kB
          Tomohito Nakayama

        Activity

          People

            tmnk Tomohito Nakayama
            tmnk Tomohito Nakayama
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: