[CONJS-52] Commit not executed when in transaction and autocommit is enabled Created: 2018-11-14  Updated: 2018-11-14  Resolved: 2018-11-14

Status: Closed
Project: MariaDB Connector/node.js
Component/s: other
Affects Version/s: None
Fix Version/s: 2.0.1-beta

Type: Bug Priority: Blocker
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
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.


Generated at Thu Feb 08 03:22:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.