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

Buffer overrun reading ResultSet - useServerPrepStmts = true

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.6.0, 2.0.1
    • 1.6.1, 2.0.2
    • Other
    • None
    • Java 8, HikariCP, MariaDB Galera 10.1.23, SpringFramework

    Description

      Since upgrading to 2.0.1, we have numerous unit test cases failing in our project. They all appear to be caused by overruning the data when reading back result sets.

      If we repeatedly run the test, the issue does not always occur at the same position in the data stream. i.e. a different column/position.

      We will continue to attempt to narrow down a small test case, and get a better understanding of the problem if that would help.

      The stack trace below shows a StringIndexOutOfBounds, due to reading a String. Similarly we get, ArrayIndexOutOfBounds of the error occurs whilst reading a column of a different type.

      java.lang.StringIndexOutOfBoundsException: String index out of range: 200
       at java.lang.String.checkBounds(Unknown Source)
       at java.lang.String.<init>(Unknown Source)
       at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.getInternalString(SelectResultSet.java:1048)
       at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.getString(SelectResultSet.java:950)
       at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.getString(SelectResultSet.java:957)
      

      Let us know if you need any further information.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            brendon Brendon Abbott
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.