Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6345360

Wrong scrollable ResultSet when executing a SQL-query with DISTINCT or GROUP BY

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      FULL PRODUCT VERSION :
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      When executing a SQL-query containing a DISTINCT or GROUP BY and putting the result in a scrollable ResultSet, the scrollable ResultSet contains X results (in which X is the number of results of the same query without the DISTINCT or GROUP BY). The first records of the scrollable ResultSet are filled with the correct values of the query containing the DISTINCT / GROUP BY. The other (redundant) records (which should not be in the scrollable ResultSet) are filled with NULL's.

      It works on a normal ResultSet, but not on a scrollable ResultSet.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A scrollable ResultSet containing the right amount of records of the SQL-query with a DISTINCT / GROUP BY without the redundant NULL-values.
      ACTUAL -
      The scrollable ResultSet contains the correct records of the SQL-query with the DISTINCT / GROUP BY, but also redundant NULL-values. (The ResultSet contains as much records as if the same SQL-query, but without the DISTINCT of GROUP BY, was executed.)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            ahandasunw Amit Handa (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: