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.