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

Calling ResultSet.isLast() on a scrollable insensitive resultset, causes the entire ResultSet to be populated

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.1.3.1, 10.2.1.6
    • 10.2.1.6
    • SQL
    • None
    • Patch Available

    Description

      The following is not a bug, however some applications do not always need to scroll to the last row, however they do want to check isLast(). Therefore it is unfortunate that isLast() is expensive. The general logic in ScrollInsensitiveResultSet is to populate rows by demand.

      The current logic in ScrollInsensitiveResultSet to return true or false on isLast(), is to move to the last row. If the last row is not the same row number as the current, then isLast() returns false. When moving to the last row, all rows will be populated into the BackingStoreHashtable of the ScrollInsensitiveResultSet.

      This logic may be rewritten to only move to the next row. If the next row exists, isLast() may return false.

      (note the logic is also optimized to use beforeFirst and afterLast flags)

      Attachments

        1. derbyall_report.txt
          14 kB
          Andreas Korneliussen
        2. DERBY-1276.diff
          2 kB
          Andreas Korneliussen
        3. DERBY-1276.stat
          0.1 kB
          Andreas Korneliussen

        Activity

          People

            andreask Andreas Korneliussen
            andreask Andreas Korneliussen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: