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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.1-beta
    • Component/s: other
    • Labels:
      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

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: