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

Buffer overrun reading ResultSet - useServerPrepStmts = true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 2.0.1
    • Fix Version/s: 1.6.1, 2.0.2
    • Component/s: Other
    • Labels:
      None
    • Environment:
      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

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            brendon Brendon Abbott
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: