@depup/mysql2 3.24.1-depup.0 → 3.24.2-depup.0
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.
- package/README.md +1 -1
- package/changes.json +1 -1
- package/lib/packets/packet.js +1 -1
- package/lib/pool_cluster.js +11 -0
- package/lib/promise/connection.js +24 -14
- package/lib/promise/pool.js +3 -1
- package/lib/promise/pool_cluster.js +6 -6
- package/lib/promise/prepared_statement_info.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @depup/mysql2
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [mysql2](https://www.npmjs.com/package/mysql2) @ 3.24.
|
|
16
|
+
| Original | [mysql2](https://www.npmjs.com/package/mysql2) @ 3.24.2 |
|
|
17
17
|
| Processed | 2026-08-24 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
package/changes.json
CHANGED
package/lib/packets/packet.js
CHANGED
package/lib/pool_cluster.js
CHANGED
|
@@ -141,6 +141,17 @@ class PoolNamespace {
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
get trace() {
|
|
145
|
+
const nodeIds = this._cluster._findNodeIds(this._pattern, true);
|
|
146
|
+
for (let i = 0; i < nodeIds.length; i++) {
|
|
147
|
+
const node = this._cluster._getNode(nodeIds[i]);
|
|
148
|
+
if (node?.pool.config.connectionConfig.trace) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return nodeIds.length === 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
144
155
|
_getClusterNode() {
|
|
145
156
|
const foundNodeIds = this._cluster._findNodeIds(this._pattern);
|
|
146
157
|
if (foundNodeIds.length === 0) {
|
|
@@ -82,9 +82,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
82
82
|
|
|
83
83
|
beginTransaction() {
|
|
84
84
|
const c = this.connection;
|
|
85
|
-
const stackHolder =
|
|
86
|
-
PromiseConnection.prototype.beginTransaction
|
|
87
|
-
|
|
85
|
+
const stackHolder = c.config.trace
|
|
86
|
+
? captureStackHolder(PromiseConnection.prototype.beginTransaction)
|
|
87
|
+
: undefined;
|
|
88
88
|
return new this.Promise((resolve, reject) => {
|
|
89
89
|
const done = makeDoneCb(resolve, reject, stackHolder);
|
|
90
90
|
c.beginTransaction(done);
|
|
@@ -93,7 +93,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
93
93
|
|
|
94
94
|
commit() {
|
|
95
95
|
const c = this.connection;
|
|
96
|
-
const stackHolder =
|
|
96
|
+
const stackHolder = c.config.trace
|
|
97
|
+
? captureStackHolder(PromiseConnection.prototype.commit)
|
|
98
|
+
: undefined;
|
|
97
99
|
return new this.Promise((resolve, reject) => {
|
|
98
100
|
const done = makeDoneCb(resolve, reject, stackHolder);
|
|
99
101
|
c.commit(done);
|
|
@@ -102,9 +104,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
102
104
|
|
|
103
105
|
rollback() {
|
|
104
106
|
const c = this.connection;
|
|
105
|
-
const stackHolder =
|
|
106
|
-
PromiseConnection.prototype.rollback
|
|
107
|
-
|
|
107
|
+
const stackHolder = c.config.trace
|
|
108
|
+
? captureStackHolder(PromiseConnection.prototype.rollback)
|
|
109
|
+
: undefined;
|
|
108
110
|
return new this.Promise((resolve, reject) => {
|
|
109
111
|
const done = makeDoneCb(resolve, reject, stackHolder);
|
|
110
112
|
c.rollback(done);
|
|
@@ -113,7 +115,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
113
115
|
|
|
114
116
|
ping() {
|
|
115
117
|
const c = this.connection;
|
|
116
|
-
const stackHolder =
|
|
118
|
+
const stackHolder = c.config.trace
|
|
119
|
+
? captureStackHolder(PromiseConnection.prototype.ping)
|
|
120
|
+
: undefined;
|
|
117
121
|
return new this.Promise((resolve, reject) => {
|
|
118
122
|
c.ping((err) => {
|
|
119
123
|
if (err) {
|
|
@@ -128,7 +132,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
128
132
|
|
|
129
133
|
reset() {
|
|
130
134
|
const c = this.connection;
|
|
131
|
-
const stackHolder =
|
|
135
|
+
const stackHolder = c.config.trace
|
|
136
|
+
? captureStackHolder(PromiseConnection.prototype.reset)
|
|
137
|
+
: undefined;
|
|
132
138
|
return new this.Promise((resolve, reject) => {
|
|
133
139
|
c.reset((err) => {
|
|
134
140
|
if (err) {
|
|
@@ -143,7 +149,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
143
149
|
|
|
144
150
|
connect() {
|
|
145
151
|
const c = this.connection;
|
|
146
|
-
const stackHolder =
|
|
152
|
+
const stackHolder = c.config.trace
|
|
153
|
+
? captureStackHolder(PromiseConnection.prototype.connect)
|
|
154
|
+
: undefined;
|
|
147
155
|
return new this.Promise((resolve, reject) => {
|
|
148
156
|
c.connect((err, param) => {
|
|
149
157
|
if (err) {
|
|
@@ -159,7 +167,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
159
167
|
prepare(options) {
|
|
160
168
|
const c = this.connection;
|
|
161
169
|
const promiseImpl = this.Promise;
|
|
162
|
-
const stackHolder =
|
|
170
|
+
const stackHolder = c.config.trace
|
|
171
|
+
? captureStackHolder(PromiseConnection.prototype.prepare)
|
|
172
|
+
: undefined;
|
|
163
173
|
return new this.Promise((resolve, reject) => {
|
|
164
174
|
c.prepare(options, (err, statement) => {
|
|
165
175
|
if (err) {
|
|
@@ -178,9 +188,9 @@ class PromiseConnection extends EventEmitter {
|
|
|
178
188
|
|
|
179
189
|
changeUser(options) {
|
|
180
190
|
const c = this.connection;
|
|
181
|
-
const stackHolder =
|
|
182
|
-
PromiseConnection.prototype.changeUser
|
|
183
|
-
|
|
191
|
+
const stackHolder = c.config.trace
|
|
192
|
+
? captureStackHolder(PromiseConnection.prototype.changeUser)
|
|
193
|
+
: undefined;
|
|
184
194
|
return new this.Promise((resolve, reject) => {
|
|
185
195
|
c.changeUser(options, (err) => {
|
|
186
196
|
if (err) {
|
package/lib/promise/pool.js
CHANGED
|
@@ -77,7 +77,9 @@ class PromisePool extends EventEmitter {
|
|
|
77
77
|
|
|
78
78
|
end() {
|
|
79
79
|
const corePool = this.pool;
|
|
80
|
-
const stackHolder =
|
|
80
|
+
const stackHolder = corePool.config.connectionConfig.trace
|
|
81
|
+
? captureStackHolder(PromisePool.prototype.end)
|
|
82
|
+
: undefined;
|
|
81
83
|
return new this.Promise((resolve, reject) => {
|
|
82
84
|
corePool.end((err) => {
|
|
83
85
|
if (err) {
|
|
@@ -25,9 +25,9 @@ class PromisePoolNamespace {
|
|
|
25
25
|
|
|
26
26
|
query(sql, values) {
|
|
27
27
|
const corePoolNamespace = this.poolNamespace;
|
|
28
|
-
const stackHolder =
|
|
29
|
-
PromisePoolNamespace.prototype.query
|
|
30
|
-
|
|
28
|
+
const stackHolder = corePoolNamespace.trace
|
|
29
|
+
? captureStackHolder(PromisePoolNamespace.prototype.query)
|
|
30
|
+
: undefined;
|
|
31
31
|
if (typeof values === 'function') {
|
|
32
32
|
throw new Error(
|
|
33
33
|
'Callback function is not available with promise clients.'
|
|
@@ -41,9 +41,9 @@ class PromisePoolNamespace {
|
|
|
41
41
|
|
|
42
42
|
execute(sql, values) {
|
|
43
43
|
const corePoolNamespace = this.poolNamespace;
|
|
44
|
-
const stackHolder =
|
|
45
|
-
PromisePoolNamespace.prototype.execute
|
|
46
|
-
|
|
44
|
+
const stackHolder = corePoolNamespace.trace
|
|
45
|
+
? captureStackHolder(PromisePoolNamespace.prototype.execute)
|
|
46
|
+
: undefined;
|
|
47
47
|
if (typeof values === 'function') {
|
|
48
48
|
throw new Error(
|
|
49
49
|
'Callback function is not available with promise clients.'
|
|
@@ -11,9 +11,9 @@ class PromisePreparedStatementInfo {
|
|
|
11
11
|
|
|
12
12
|
execute(parameters) {
|
|
13
13
|
const s = this.statement;
|
|
14
|
-
const stackHolder =
|
|
15
|
-
PromisePreparedStatementInfo.prototype.execute
|
|
16
|
-
|
|
14
|
+
const stackHolder = s._connection.config.trace
|
|
15
|
+
? captureStackHolder(PromisePreparedStatementInfo.prototype.execute)
|
|
16
|
+
: undefined;
|
|
17
17
|
return new this.Promise((resolve, reject) => {
|
|
18
18
|
const done = makeDoneCb(resolve, reject, stackHolder);
|
|
19
19
|
if (parameters) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/mysql2",
|
|
3
|
-
"version": "3.24.
|
|
3
|
+
"version": "3.24.2-depup.0",
|
|
4
4
|
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS (with updated dependencies)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "typings/mysql/index",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"changes": {},
|
|
96
96
|
"depsUpdated": 0,
|
|
97
97
|
"originalPackage": "mysql2",
|
|
98
|
-
"originalVersion": "3.24.
|
|
99
|
-
"processedAt": "2026-08-
|
|
98
|
+
"originalVersion": "3.24.2",
|
|
99
|
+
"processedAt": "2026-08-24T16:12:32.885Z",
|
|
100
100
|
"smokeTest": "passed"
|
|
101
101
|
}
|
|
102
102
|
}
|