badmfck-api-server 3.8.6 → 3.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -442,7 +442,7 @@ class MysqlAdapter {
|
|
442
442
|
try {
|
443
443
|
let result = null;
|
444
444
|
if (this.options.maxQueryTimeout && this.options.maxQueryTimeout > 0)
|
445
|
-
result = await this.withTimeout(conn.query(query), this.options.maxQueryTimeout
|
445
|
+
result = await this.withTimeout(conn.query(query), this.options.maxQueryTimeout, query);
|
446
446
|
else
|
447
447
|
result = await conn.query(query);
|
448
448
|
this.lastSuccessQueryTime = +new Date();
|
@@ -458,6 +458,11 @@ class MysqlAdapter {
|
|
458
458
|
};
|
459
459
|
}
|
460
460
|
catch (e) {
|
461
|
+
if (request.transactionID) {
|
462
|
+
const trx = this.transactions.find(i => i.id === request.transactionID);
|
463
|
+
if (trx)
|
464
|
+
this.storeTransactionAsProblem(trx, query);
|
465
|
+
}
|
461
466
|
if (!request.transactionID && doCloseConnection)
|
462
467
|
this.finalizeConnection(conn);
|
463
468
|
else if (request.transactionID && request.throwable) {
|
@@ -611,7 +616,7 @@ class MysqlAdapter {
|
|
611
616
|
if (!field.fields[key])
|
612
617
|
continue;
|
613
618
|
const val = promise_1.default.escape(field.fields[key]);
|
614
|
-
value = this.safeReplace(value, key, val);
|
619
|
+
value = this.safeReplace(value, "@" + key, val);
|
615
620
|
}
|
616
621
|
}
|
617
622
|
field.__parsedValue = value;
|
@@ -648,7 +653,6 @@ class MysqlAdapter {
|
|
648
653
|
try {
|
649
654
|
(0, LogService_1.logDB)("Rollback started", trx.conn.threadId);
|
650
655
|
await trx.conn.rollback();
|
651
|
-
await trx.conn.commit();
|
652
656
|
trx.conn.removeAllListeners();
|
653
657
|
trx.conn.release();
|
654
658
|
(0, LogService_1.logDB)("Rollback connection released", trx.conn.threadId);
|