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

Current position is after the last row

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.6.2
    • N/A
    • aurora
    • None
    • AWS Aurora MySQL 5.6

    Description

      Hi there,

      not really a bug but this looks like the best place to ask and I am a bit lost.

      I am regulary seeing a "Current position is after the last row" SQLException in my production logs. I have no idea why they happen and I am unable to reproduce the error on my local machine. In addition, this exception does not happen every time. Just a small fraction within thousands of other statements that do work.

      Unfortunately reading the source code didn't help me much either. I know why the error happens, but I don't understand why this situation even occurs. rowPointer >= dataSize should never happen.

      Here are the steps I do in production

      • connection.prepareStatement("SELECT * FROM Table WHERE Id = ? FOR UPDATE",
        ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)
      • Next I check the ResultSet (rs) returned from executeQuery
      • If rs.next() is true
      • I might do an rs.updateRow()
      • If rs.next() is false
      • rs.moveToInsertRow(), some rs.updateXZY and followed by rs.insertRow()

      In summary I do a insert row if it doesn't exist otherwise I might update the row.

      Any ideas how to narrow this one down?

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            raupach Björn Raupach
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.