Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4334

Sybase JDBC returns true for ResultSet.isBeforeFirst() when the ResultSet is empty

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: EAP_EWP 5.1.0, 4.3.0.GA_CP09, 4.2.0.GA_CP10
    • Fix Version/s: TBD
    • Component/s: Hibernate
    • Labels:
      None
    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      A bug in jConnect means that the <methodname>FetchingScrollableResultsImpl.isResultSetEmpty()</methodname> method returns the following to determine if a ResultSet is empty:

      currentPosition == 0 && ! getResultSet().isBeforeFirst() && ! getResultSet().isAfterLast();

      When the ResultSet is empty, <methodname>FetchingScrollableResultsImpl.isResultSetEmpty()</methodname> should return false but Sybase JDBC returns true. There is currently no workaround for this issue.
      Show
      A bug in jConnect means that the <methodname>FetchingScrollableResultsImpl.isResultSetEmpty()</methodname> method returns the following to determine if a ResultSet is empty: currentPosition == 0 && ! getResultSet().isBeforeFirst() && ! getResultSet().isAfterLast(); When the ResultSet is empty, <methodname>FetchingScrollableResultsImpl.isResultSetEmpty()</methodname> should return false but Sybase JDBC returns true. There is currently no workaround for this issue.
    • Release Notes Docs Status:
      Not Required

      Description

      To determine if a ResultSet is empty, FetchingScrollableResultsImpl.isResultSetEmpty() returns:
      currentPosition == 0 && ! getResultSet().isBeforeFirst() && ! getResultSet().isAfterLast();

      For Sybase ASE 15, when the ResultSet is empty, FetchingScrollableResultsImpl.isResultSetEmpty() returns false.
      The problem is that Sybase JDBC returns true for ResultSet.isBeforeFirst() and/or ResultSet.isAfterLast() when the ResultSet is empty.
      An empty ResultSet is properly detected for Oracle 10g, SQL Server, MySQL, and DB2 9.7.
      This looks like a bug in Sybase JDBC.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stliu Strong Liu
                  Reporter:
                  stliu Strong Liu
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: