mysql2 3.9.6 → 3.9.7

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.
@@ -42,9 +42,9 @@ function readCodeFor(field, config, options, fieldNum) {
42
42
  case Types.TIMESTAMP:
43
43
  case Types.NEWDATE:
44
44
  if (helpers.typeMatch(field.columnType, dateStrings, Types)) {
45
- return `packet.readDateTimeString(${field.decimals});`;
45
+ return `packet.readDateTimeString(${parseInt(field.decimals, 10)});`;
46
46
  }
47
- return `packet.readDateTime('${timezone}');`;
47
+ return `packet.readDateTime(${helpers.srcEscape(timezone)});`;
48
48
  case Types.TIME:
49
49
  return 'packet.readTimeString()';
50
50
  case Types.DECIMAL:
@@ -48,13 +48,13 @@ function readCodeFor(type, charset, encodingExpr, config, options) {
48
48
  if (helpers.typeMatch(type, dateStrings, Types)) {
49
49
  return 'packet.readLengthCodedString("ascii")';
50
50
  }
51
- return `packet.parseDate('${timezone}')`;
51
+ return `packet.parseDate(${helpers.srcEscape(timezone)})`;
52
52
  case Types.DATETIME:
53
53
  case Types.TIMESTAMP:
54
54
  if (helpers.typeMatch(type, dateStrings, Types)) {
55
55
  return 'packet.readLengthCodedString("ascii")';
56
56
  }
57
- return `packet.parseDateTime('${timezone}')`;
57
+ return `packet.parseDateTime(${helpers.srcEscape(timezone)})`;
58
58
  case Types.TIME:
59
59
  return 'packet.readLengthCodedString("ascii")';
60
60
  case Types.GEOMETRY:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysql2",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
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",