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

PreparedStatement#executeBatch Does Not Properly Handle Interrupts

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.7
    • 1.5.8
    • Other
    • None

    Description

      The PreparedStatement#executeBatch() functionality does not properly handle interrupts when the thread is interrupted while waiting on a response from the server.

      The InterruptedException is currently being swallowed in AbstractMultiSend instead of being propagated back to the caller.

      This manifested as a NullPointerException:

      java.lang.NullPointerException: null
      	at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeBatch(MariaDbServerPreparedStatement.java:276) ~[mariadb-java-client-1.5.7.jar:na]
      ...snip...
      

      The NPE is due a race condition. The thread was interrupted so it is returning before the results are available

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            kevinconaway Kevin Conaway
            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.