From 99b1a9843ae4ab9ce1047fefdcc91ef15c444cc1 Mon Sep 17 00:00:00 2001 From: Tim Stableford Date: Tue, 25 Apr 2023 09:38:26 +0100 Subject: [PATCH] Added missing encoding argument to server-handshake 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 {