Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-541

resultSet.relative() behavior is incorrect when crossing result set boundaries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0, 1.7.0
    • Other
    • None

    Description

      When going forward (positive offset), reaching the position just after the last row will make relative() return true (as if the result set was positioned on a row).

      When going backward (negative offset), trying to reach a row before the first will never work: the result set will appear "stuck" on the first row.

      According to the ResultSet interface's Javadoc (java.sql.ResultSet#relative):

      Attempting to move beyond the first/last row in the
      result set positions the cursor before/after the
      the first/last row.

      And:

      @return <code>true</code> if the cursor is on a row; <code>false</code> otherwise

      So the current behavior is incorrect.

      PR with test cases (and hopefully a fix) coming soon.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            yrodiere Yoann Rodiere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.