Modified condition from gt to gte for distinguishing OK Packet from EOF Packet #594
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Incorrect length condition in documentation for OK_Packet
In the documentation for OK_Packet in
sql/protocol_classic.cc:721
, it is mentioned that the conditionheader=0 and length of packet > 7
may be used to distinguish a packet as an OK packet. However, there may be scenarios when an OK Packet length is of excatly 7 bytes.One such scenario is the OK Packet received after successful authentication using
Protocol::AuthSwitchResponse:
, which is as folows:This was observed on:
Server Version: 8.0.32
Server Capabilities:
0xffff
Client Version: Ver 8.0.40-0ubuntu0.24.10.1 for Linux on x86_64 ((Ubuntu))
Client Capabilities Bitmask:
0xa65
Extended Client Capabilities Bitmask:
0x19ff
Command used for login:
Annotated packet dump follows:
Server: Greeting
Client: Login Request
Server: Auth Switch Request
Client: Auth Switch Response
Server: OK