mysql2 3.24.5 → 3.24.6-canary.8c068ef
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/lib/commands/query.js +5 -4
- package/package.json +1 -1
package/lib/commands/query.js
CHANGED
|
@@ -12,7 +12,8 @@ const staticParser = require('../parsers/static_text_parser.js');
|
|
|
12
12
|
const ServerStatus = require('../constants/server_status.js');
|
|
13
13
|
const ConnectionConfig = require('../connection_config.js');
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const createEmptyPacket = () =>
|
|
16
|
+
new Packets.Packet(0, Buffer.allocUnsafe(4), 0, 4);
|
|
16
17
|
|
|
17
18
|
// http://dev.mysql.com/doc/internals/en/com-query.html
|
|
18
19
|
class Query extends Command {
|
|
@@ -157,7 +158,7 @@ class Query extends Command {
|
|
|
157
158
|
this._localStreamError = new Error(
|
|
158
159
|
`As a result of LOCAL INFILE command server wants to read ${path} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`
|
|
159
160
|
);
|
|
160
|
-
connection.writePacket(
|
|
161
|
+
connection.writePacket(createEmptyPacket());
|
|
161
162
|
return this.infileOk;
|
|
162
163
|
}
|
|
163
164
|
|
|
@@ -179,12 +180,12 @@ class Query extends Command {
|
|
|
179
180
|
};
|
|
180
181
|
const onEnd = () => {
|
|
181
182
|
connection.removeListener('error', onConnectionError);
|
|
182
|
-
connection.writePacket(
|
|
183
|
+
connection.writePacket(createEmptyPacket());
|
|
183
184
|
};
|
|
184
185
|
const onError = (err) => {
|
|
185
186
|
this._localStreamError = err;
|
|
186
187
|
connection.removeListener('error', onConnectionError);
|
|
187
|
-
connection.writePacket(
|
|
188
|
+
connection.writePacket(createEmptyPacket());
|
|
188
189
|
};
|
|
189
190
|
this._unpipeStream = () => {
|
|
190
191
|
connection.stream.removeListener('pause', onPause);
|
package/package.json
CHANGED