Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
None
-
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.