Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-52

Commit not executed when in transaction and autocommit is enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0.1-beta
    • other
    • None

    Description

      Commit not executed when in transaction and autocommit is enabled.
      example :

          pool.getConnection()
          .then(conn =>{
            conn.beginTransaction()
            .then(() =>{
              return conn.query("UPDATE ensureCommit SET firstName='Tom'")
            })
            .then(()=>{
              conn.commit(); //-DOESN'T execute commit.
              conn.end();
            .catch(err=>{
              conn.rollback();
            })
          });
      

      Actual implementation test if a transaction is active AND that autocommit is not set.
      Only the status of having a transaction active is needed.

      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.