mysql2 3.14.0 → 3.14.1-canary.9d097f8d

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.
@@ -46,4 +46,5 @@ module.exports = {
46
46
  cp932: 95,
47
47
  eucjpms: 97,
48
48
  gb18030: 248,
49
+ utf8mb3: 192,
49
50
  };
@@ -64,7 +64,13 @@ class ResultSetHeader {
64
64
  stateChanges.systemVariables[key] = val;
65
65
  if (key === 'character_set_client') {
66
66
  const charsetNumber = EncodingToCharset[val];
67
- connection.config.charsetNumber = charsetNumber;
67
+ // TODO - better api for driver users to handle unknown encodings?
68
+ // maybe custom coverter in the config?
69
+ // For now just ignore character_set_client command if there is
70
+ // no known mapping from reported encoding to a charset code
71
+ if (typeof charsetNumber !== 'undefined') {
72
+ connection.config.charsetNumber = charsetNumber;
73
+ }
68
74
  }
69
75
  } else if (type === sessionInfoTypes.SCHEMA) {
70
76
  key = packet.readLengthCodedString(encoding);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysql2",
3
- "version": "3.14.0",
3
+ "version": "3.14.1-canary.9d097f8d",
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",