From f5eebefe234087b20399584cb018d0705224ca3f Mon Sep 17 00:00:00 2001 From: Bradley Grainger Date: Wed, 17 Jul 2024 10:47:51 -0700 Subject: [PATCH] Don't parse the rest of the OK packet if we're not returning it. Signed-off-by: Bradley Grainger --- src/MySqlConnector/Protocol/Payloads/OkPayload.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MySqlConnector/Protocol/Payloads/OkPayload.cs b/src/MySqlConnector/Protocol/Payloads/OkPayload.cs index 50be1db79..a08a3195d 100644 --- a/src/MySqlConnector/Protocol/Payloads/OkPayload.cs +++ b/src/MySqlConnector/Protocol/Payloads/OkPayload.cs @@ -69,7 +69,7 @@ public static void Verify(ReadOnlySpan span, IServerCapabilities serverCap if (serverCapabilities.SupportsSessionTrack) { - if (reader.BytesRemaining > 0) + if (reader.BytesRemaining > 0 && createPayload) { statusBytes = reader.ReadLengthEncodedByteString(); // human-readable info while (reader.BytesRemaining > 0)