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

NPE in AbstractQueryProtocol with no parameters caused by some prepared statements

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.3.3, 1.3.4, 1.3.5
    • 1.3.6
    • Other
    • None

    Description

      Our system is getting this NPE when starting up against a MySQL (5.6.23) database. I'm not seeing this against a MariaDB server.

      From what I can see in MariaDbServerPreparedStatement, if parameterCount is 0 it doesn't set parameterHolder to any value. It passes it along to executeInternal where it does a lookup against it and gets the NPE.
      int parameterCount = parameters.length;

      This error did not happen on 1.2.2 (I don't believe 1.2.3 either) but I'm seeing it on 1.3.3 but might have been introduced earlier.

      Caused by: java.lang.NullPointerException
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executePreparedQuery(AbstractQueryProtocol.java:567)
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:281)
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:371)
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeUpdate(MariaDbServerPreparedStatement.java:349)
      at com.zaxxer.hikari.proxy.PreparedStatementProxy.executeUpdate(PreparedStatementProxy.java:61)
      at com.zaxxer.hikari.proxy.HikariPreparedStatementProxy.executeUpdate(HikariPreparedStatementProxy.java)

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            jonespm Matthew Jones
            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.