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

includeThreadDumpInDeadlockExceptions always includes the thread dump, even when it is not a deadlock exception

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.7.2
    • 2.7.3, 3.0.0
    • Other
    • None

    Description

      When the option includeThreadDumpInDeadlockExceptions is set to true, any SQL exception causes a thread dump to be added to the exception message.

      org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.buildMsgText(String, long, Options, Exception) does this:

      if (options != null
              && options.includeInnodbStatusInDeadlockExceptions
              && deadLockException != null) {
            msg.append("\ndeadlock information: ").append(deadLockException);
      }
       
      if (options != null && options.includeThreadDumpInDeadlockExceptions) {
        // append thread dump
      }
      

      I'm not confident with this code, but I suspect that the second block should also be executed only if deadLockException != null.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            mauromol Mauro Molinari
            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.