Document previously undocumented behavior regarding the sending of default values in ColumnDefinition for CLIENT_PROTOCOL_41. #603
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.
Though as per the documentation
COM_FIELD_LIST
is deprecated, mysql client version 8.0.41 still uses it. Upon connecting to the server without the-A
flag, the client issues aCOM_FIELD_LIST
command as soon as a database is selected, or upon successful connection to the server if the database was mentioned during the connection phase.As per the documentation of
COM_FIELD_LIST
, the response contains severalColumnDefinition
packets. These packets contain the default values as part of the packet body, however, this behaviour is not mentioned on theColumnDefinition
documentation forProtocol::ColumnDefinition41
(it is mentioned forProtocol::ColumnDefinition320
). This behaviour is exclusive toCOM_FIELD_LIST
as it is the only invocation ofTHD::send_result_metadata
with theProtocol::SEND_DEFAULTS
flag(sql/sql_show.cc:1417
).Modifications
ColumnDefinition
.Minor modifications:
mysys/pack.cc:113
: Fix gramatical error.sql/protocol_classic.cc:134
: Mention NULL condition forProtocol::LengthEncodedString
, previously undocumented.Steps to replicate:
Commands mentioned in the next section.
Console Logs and Packet Capture follows:
Console Logs:
--get-server-public-key=true --ssl-mode=DISABLED
flags added to allow plaintext capture of packets.Packet Capture
ColumnDefinition
packet forDrop_role_priv
column ofmysql.user
table. (Default value isN
).ColumnDefinition
packet forUser_attributes
column ofmysql.user
table. (Default value isNULL
).