badmfck-api-server 2.2.6 → 2.2.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -325,6 +325,7 @@ class MysqlService extends BaseService_1.BaseService {
|
|
325
325
|
i.conn.removeAllListeners();
|
326
326
|
await i.conn.rollback();
|
327
327
|
i.conn.release();
|
328
|
+
console.log("Transaction rollbacked: ", i.id, i.queries);
|
328
329
|
}
|
329
330
|
catch (e) {
|
330
331
|
(0, LogService_1.logError)("Can't release transaction connection", e);
|
@@ -585,6 +586,12 @@ class MysqlService extends BaseService_1.BaseService {
|
|
585
586
|
});
|
586
587
|
return;
|
587
588
|
}
|
589
|
+
for (let i of this.transactions) {
|
590
|
+
if (i.conn === conn) {
|
591
|
+
(0, LogService_1.logInfo)("Your connection is in transaction");
|
592
|
+
break;
|
593
|
+
}
|
594
|
+
}
|
588
595
|
this.sendQuery(conn, query, resolve, rollbackQuery);
|
589
596
|
}
|
590
597
|
catch (e) {
|