From a4b6b223434d1cbdb5af9141cf3bd085459bb6b8 Mon Sep 17 00:00:00 2001 From: Tim Stableford Date: Tue, 25 Apr 2023 13:40:54 +0100 Subject: [PATCH] fix(server): Added missing encoding argument to server-handshake (#1976) Resolves https://github.com/sidorares/node-mysql2/issues/1975 --- lib/commands/server_handshake.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/server_handshake.js b/lib/commands/server_handshake.js index b5defee30d..d93462e171 100644 --- a/lib/commands/server_handshake.js +++ b/lib/commands/server_handshake.js @@ -138,7 +138,7 @@ class ServerHandshake extends Command { break; case CommandCode.FIELD_LIST: if (connection.listeners('field_list').length) { - const table = packet.readNullTerminatedString(); + const table = packet.readNullTerminatedString(encoding); const fields = packet.readString(undefined, encoding); connection.emit('field_list', table, fields); } else {