mysql2 3.23.2-canary.f64ce07 → 3.23.2

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.
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ const Timers = require('timers');
4
+
3
5
  const Command = require('./command.js');
4
6
  const Query = require('./query.js');
5
7
  const Packets = require('../packets/index.js');
@@ -63,7 +65,16 @@ class Execute extends Command {
63
65
  try {
64
66
  connection.writePacket(executePacket.toPacket(1));
65
67
  } catch (error) {
66
- this.onResult(error);
68
+ if (this.queryTimeout) {
69
+ Timers.clearTimeout(this.queryTimeout);
70
+ this.queryTimeout = null;
71
+ }
72
+ if (this.onResult) {
73
+ this.onResult(error);
74
+ } else {
75
+ this.emit('error', error);
76
+ }
77
+ return null;
67
78
  }
68
79
  return Execute.prototype.resultsetHeader;
69
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysql2",
3
- "version": "3.23.2-canary.f64ce07",
3
+ "version": "3.23.2",
4
4
  "description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
5
5
  "main": "index.js",
6
6
  "typings": "typings/mysql/index",