diff --git a/patches/mysql2+^3.0.1.patch b/patches/mysql2+^3.2.0.patch similarity index 92% rename from patches/mysql2+^3.0.1.patch rename to patches/mysql2+^3.2.0.patch index b5131a5..2458de1 100644 --- a/patches/mysql2+^3.0.1.patch +++ b/patches/mysql2+^3.2.0.patch @@ -1,10 +1,10 @@ # generated by patch-package 6.4.14 # # declared package: -# mysql2: ^3.0.1 +# mysql2: ^3.2.0 # diff --git a/node_modules/mysql2/index.d.ts b/node_modules/mysql2/index.d.ts -index 31195a1..bc1adaa 100644 +index ec138d2..968c32f 100644 --- a/node_modules/mysql2/index.d.ts +++ b/node_modules/mysql2/index.d.ts @@ -172,7 +172,6 @@ export interface ConnectionOptions extends mysql.ConnectionOptions { @@ -62,7 +62,7 @@ index e51da3c..d9218d3 100644 } } diff --git a/node_modules/mysql2/lib/connection.js b/node_modules/mysql2/lib/connection.js -index 7e8a1a0..cc749e0 100644 +index 790226a..732be9d 100644 --- a/node_modules/mysql2/lib/connection.js +++ b/node_modules/mysql2/lib/connection.js @@ -32,8 +32,6 @@ const CharsetToEncoding = require('./constants/charset_encodings.js'); @@ -74,7 +74,7 @@ index 7e8a1a0..cc749e0 100644 class Connection extends EventEmitter { constructor(opts) { super(); -@@ -526,7 +524,7 @@ class Connection extends EventEmitter { +@@ -528,7 +526,7 @@ class Connection extends EventEmitter { sql: sql, values: values }; @@ -83,7 +83,7 @@ index 7e8a1a0..cc749e0 100644 return SqlString.format( opts.sql, opts.values, -@@ -547,23 +545,6 @@ class Connection extends EventEmitter { +@@ -549,23 +547,6 @@ class Connection extends EventEmitter { return SqlString.raw(sql); } @@ -107,7 +107,7 @@ index 7e8a1a0..cc749e0 100644 query(sql, values, cb) { let cmdQuery; if (sql.constructor === Commands.Query) { -@@ -571,7 +552,7 @@ class Connection extends EventEmitter { +@@ -573,7 +554,7 @@ class Connection extends EventEmitter { } else { cmdQuery = Connection.createQuery(sql, values, cb, this.config); } @@ -116,7 +116,7 @@ index 7e8a1a0..cc749e0 100644 const rawSql = this.format(cmdQuery.sql, cmdQuery.values !== undefined ? cmdQuery.values : []); cmdQuery.sql = rawSql; return this.addCommand(cmdQuery); -@@ -639,26 +620,12 @@ class Connection extends EventEmitter { +@@ -641,26 +622,12 @@ class Connection extends EventEmitter { options.sql = sql; options.values = values; } @@ -146,10 +146,10 @@ index 7e8a1a0..cc749e0 100644 if (typeof val === 'function') { throw new TypeError( diff --git a/node_modules/mysql2/lib/connection_config.js b/node_modules/mysql2/lib/connection_config.js -index 98fa1d3..2189e33 100644 +index edb7fcf..de5b51f 100644 --- a/node_modules/mysql2/lib/connection_config.js +++ b/node_modules/mysql2/lib/connection_config.js -@@ -204,7 +204,6 @@ class ConnectionConfig { +@@ -213,7 +213,6 @@ class ConnectionConfig { 'LONG_PASSWORD', 'FOUND_ROWS', 'LONG_FLAG', @@ -157,26 +157,21 @@ index 98fa1d3..2189e33 100644 'ODBC', 'LOCAL_FILES', 'IGNORE_SPACE', -@@ -217,15 +216,14 @@ class ConnectionConfig { - 'TRANSACTIONS', - 'SESSION_TRACK' +@@ -227,9 +226,12 @@ class ConnectionConfig { + 'SESSION_TRACK', + 'CONNECT_ATTRS' ]; - if (options && options.multipleStatements) { - defaultFlags.push('MULTI_STATEMENTS'); ++ + if (options) { + if (options.multipleStatements) defaultFlags.push('MULTI_STATEMENTS'); + if (options.database) defaultFlags.push('CONNECT_WITH_DB'); -+ if (options.connectAttributes) defaultFlags.push('CONNECT_ATTRS') } ++ defaultFlags.push('PLUGIN_AUTH'); defaultFlags.push('PLUGIN_AUTH_LENENC_CLIENT_DATA'); -- if (options && options.connectAttributes) { -- defaultFlags.push('CONNECT_ATTRS'); -- } - return defaultFlags; - } - diff --git a/node_modules/mysql2/lib/packets/execute.js b/node_modules/mysql2/lib/packets/execute.js index daf1df9..4ed2744 100644 --- a/node_modules/mysql2/lib/packets/execute.js @@ -219,20 +214,21 @@ index 49a128c..7eafb2c 100644 if (field.columnType === Types.JSON && encoding === field.encoding) { // Since for JSON columns mysql always returns charset 63 (BINARY), diff --git a/node_modules/mysql2/lib/pool.js b/node_modules/mysql2/lib/pool.js -index 6a7ab48..0ebd1d2 100644 +index db54a7a..f104061 100644 --- a/node_modules/mysql2/lib/pool.js +++ b/node_modules/mysql2/lib/pool.js -@@ -151,7 +151,7 @@ class Pool extends EventEmitter { +@@ -155,7 +155,8 @@ class Pool extends EventEmitter { }); } catch (e) { conn.release(); - throw e; ++ // throw e; + return cb(e); } }); return cmdQuery; diff --git a/node_modules/mysql2/promise.d.ts b/node_modules/mysql2/promise.d.ts -index b5441ab..9c1b413 100644 +index b5441ab..c4ddfbe 100644 --- a/node_modules/mysql2/promise.d.ts +++ b/node_modules/mysql2/promise.d.ts @@ -26,41 +26,15 @@ export interface Connection extends EventEmitter { @@ -253,7 +249,7 @@ index b5441ab..9c1b413 100644 - values: any | any[] | { [param: string]: any } - ): Promise<[T, FieldPacket[]]>; + sql_or_options: string | QueryOptions, -+ values?: any | any[] | { [param: string]: any }, ++ values?: any | any[] | { [param: string]: any } + ): Promise<[T, FieldPacket[], number]>; execute< @@ -278,7 +274,7 @@ index b5441ab..9c1b413 100644 - options: QueryOptions, - values: any | any[] | { [param: string]: any } + sql_or_options: string | QueryOptions, -+ values?: any | any[] | { [param: string]: any }, ++ values?: any | any[] | { [param: string]: any } ): Promise<[T, FieldPacket[]]>; prepare(options: string | QueryOptions): Promise; @@ -300,7 +296,7 @@ index b5441ab..9c1b413 100644 - values: any | any[] | { [param: string]: any } - ): Promise<[T, FieldPacket[]]>; + sql_or_options: string | QueryOptions, -+ values?: any | any[] | { [param: string]: any }, ++ values?: any | any[] | { [param: string]: any } + ): Promise<[T, FieldPacket[], number]>; execute< @@ -325,7 +321,7 @@ index b5441ab..9c1b413 100644 - options: QueryOptions, - values: any | any[] | { [param: string]: any } + sql_or_options: string | QueryOptions, -+ values?: any | any[] | { [param: string]: any }, ++ values?: any | any[] | { [param: string]: any } ): Promise<[T, FieldPacket[]]>; getConnection(): Promise; @@ -352,10 +348,10 @@ index a264e77..20c1b68 100644 }; } diff --git a/node_modules/mysql2/typings/mysql/lib/Connection.d.ts b/node_modules/mysql2/typings/mysql/lib/Connection.d.ts -index 12204cf..b5899ef 100644 +index 08a51b4..49ff4af 100644 --- a/node_modules/mysql2/typings/mysql/lib/Connection.d.ts +++ b/node_modules/mysql2/typings/mysql/lib/Connection.d.ts -@@ -254,7 +254,7 @@ declare class Connection extends EventEmitter { +@@ -259,7 +259,7 @@ declare class Connection extends EventEmitter { changeUser(options: Connection.ConnectionOptions, callback?: (err: Query.QueryError | null) => void): void; query(sql: string, callback?: (err: Query.QueryError | null, result: T, fields: FieldPacket[]) => any): Query; @@ -365,10 +361,10 @@ index 12204cf..b5899ef 100644 query(options: Query.QueryOptions, values: any | any[] | { [param: string]: any }, callback?: (err: Query.QueryError | null, result: T, fields: FieldPacket[]) => any): Query; diff --git a/node_modules/mysql2/typings/mysql/lib/Pool.d.ts b/node_modules/mysql2/typings/mysql/lib/Pool.d.ts -index bebe039..d6fed9f 100644 +index 4d7ac68..ffeb667 100644 --- a/node_modules/mysql2/typings/mysql/lib/Pool.d.ts +++ b/node_modules/mysql2/typings/mysql/lib/Pool.d.ts -@@ -52,7 +52,7 @@ declare class Pool extends EventEmitter { +@@ -62,7 +62,7 @@ declare class Pool extends EventEmitter { getConnection(callback: (err: NodeJS.ErrnoException | null, connection: PoolConnection) => any): void; query(sql: string, callback?: (err: Query.QueryError | null, result: T, fields: FieldPacket[]) => any): Query;