11# generated by patch-package 6.4.14
22#
33# declared package:
4- # mysql2: 3.5.1
4+ # mysql2: 3.10.2
55#
66diff --git a/node_modules/mysql2/lib/connection.js b/node_modules/mysql2/lib/connection.js
7- index d6ad7a4..ceac670 100644
7+ index 113fc7d..3a997a4 100644
88--- a/node_modules/mysql2/lib/connection.js
99+++ b/node_modules/mysql2/lib/connection.js
1010@@ -32,7 +32,7 @@ const CharsetToEncoding = require('./constants/charset_encodings.js');
@@ -16,7 +16,7 @@ index d6ad7a4..ceac670 100644
1616
1717 class Connection extends EventEmitter {
1818 constructor(opts) {
19- @@ -521 ,7 +521 ,7 @@ class Connection extends EventEmitter {
19+ @@ -524 ,7 +524 ,7 @@ class Connection extends EventEmitter {
2020 sql: sql,
2121 values: values
2222 };
@@ -25,7 +25,7 @@ index d6ad7a4..ceac670 100644
2525 return SqlString.format(
2626 opts.sql,
2727 opts.values,
28- @@ -543 ,20 +543 ,20 @@ class Connection extends EventEmitter {
28+ @@ -546 ,20 +546 ,20 @@ class Connection extends EventEmitter {
2929 }
3030
3131 _resolveNamedPlaceholders(options) {
@@ -60,7 +60,7 @@ index d6ad7a4..ceac670 100644
6060 }
6161
6262 query(sql, values, cb) {
63- @@ -566 ,7 +566 ,7 @@ class Connection extends EventEmitter {
63+ @@ -569 ,7 +569 ,7 @@ class Connection extends EventEmitter {
6464 } else {
6565 cmdQuery = Connection.createQuery(sql, values, cb, this.config);
6666 }
@@ -69,7 +69,7 @@ index d6ad7a4..ceac670 100644
6969 const rawSql = this.format(cmdQuery.sql, cmdQuery.values !== undefined ? cmdQuery.values : []);
7070 cmdQuery.sql = rawSql;
7171 return this.addCommand(cmdQuery);
72- @@ -634 ,26 +634 ,27 @@ class Connection extends EventEmitter {
72+ @@ -644 ,26 +644 ,27 @@ class Connection extends EventEmitter {
7373 options.sql = sql;
7474 options.values = values;
7575 }
@@ -128,10 +128,10 @@ index daf1df9..0862ce1 100644
128128 case 'number':
129129 type = Types.DOUBLE;
130130diff --git a/node_modules/mysql2/lib/parsers/binary_parser.js b/node_modules/mysql2/lib/parsers/binary_parser.js
131- index bbd2959..80ab00d 100644
131+ index c80bf96..da453ca 100644
132132--- a/node_modules/mysql2/lib/parsers/binary_parser.js
133133+++ b/node_modules/mysql2/lib/parsers/binary_parser.js
134- @@ -72 ,7 +72 ,7 @@ function readCodeFor(field, config, options, fieldNum) {
134+ @@ -75 ,7 +75 ,7 @@ function readCodeFor(field, config, options, fieldNum) {
135135
136136 default:
137137 if (field.characterSet === Charsets.BINARY) {
@@ -140,29 +140,35 @@ index bbd2959..80ab00d 100644
140140 }
141141 return `packet.readLengthCodedString(fields[${fieldNum}].encoding)`;
142142 }
143+ @@ -92,6 +92,7 @@ function compile(fields, options, config) {
144+ db: field.schema,
145+ table: field.table,
146+ name: field.name,
147+ + charset: field.characterSet,
148+ string: function (encoding = field.encoding) {
149+ if (field.columnType === Types.JSON && encoding === field.encoding) {
150+ // Since for JSON columns mysql always returns charset 63 (BINARY),
143151diff --git a/node_modules/mysql2/lib/parsers/text_parser.js b/node_modules/mysql2/lib/parsers/text_parser.js
144- index 49a128c..7eafb2c 100644
152+ index f66a185..55c8b63 100644
145153--- a/node_modules/mysql2/lib/parsers/text_parser.js
146154+++ b/node_modules/mysql2/lib/parsers/text_parser.js
147- @@ -85 ,6 +85 ,7 @@ function compile(fields, options, config) {
155+ @@ -88 ,6 +88 ,7 @@ function compile(fields, options, config) {
148156 db: field.schema,
149157 table: field.table,
150158 name: field.name,
151159+ charset: field.characterSet,
152- string: function(encoding = field.encoding) {
160+ string: function (encoding = field.encoding) {
153161 if (field.columnType === Types.JSON && encoding === field.encoding) {
154162 // Since for JSON columns mysql always returns charset 63 (BINARY),
155- diff --git a/node_modules/mysql2/lib/pool.js b/node_modules/mysql2/lib/pool.js
156- index db54a7a..f104061 100644
157- --- a/node_modules/mysql2/lib/pool.js
158- +++ b/node_modules/mysql2/lib/pool.js
159- @@ -155,7 +155,8 @@ class Pool extends EventEmitter {
160- });
161- } catch (e) {
162- conn.release();
163- - throw e;
164- + // throw e;
165- + return cb(e);
166- }
167- });
168- return cmdQuery;
163+ diff --git a/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts b/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
164+ index 65bfaa8..52ab677 100644
165+ --- a/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
166+ +++ b/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
167+ @@ -43,6 +43,7 @@ export type Field = Type & {
168+ db: string;
169+ table: string;
170+ name: string;
171+ + charset: number;
172+ string: (encoding?: BufferEncoding | string | undefined) => string | null;
173+ buffer: () => Buffer | null;
174+ geometry: () => Geometry | Geometry[] | null;
0 commit comments