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

handle server configuration autocommit=0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • all
    • 1.4.0
    • Other
    • None

    Description

      Driver rely on status_flags with "SERVER_STATUS_AUTOCOMMIT" to know the autocommit state.

      Problem is when server has autocommit set to false by configuration, this flag is always returning the 2 byte value (true).

      That cause problems :

      • Since 1.3.0 version commit on autocommit connecton where throwing exception.
      • Since 1.3.4. to not be too hash with user, and some framework (like play that send commit even when in autocommit mode), Connection.commit send the "COMMIT" command to server only when in autocommit= false, so commit are never send in this case.

      Correction cannot be done only server side, because driver must work with older database version. (and mysql and mariadb have the same problem).
      So, the solution is to force the session value by "set session autocommit=1" when initializing the connection. After this command, server set correctly the status flag.

      Attachments

        Activity

          People

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