Skip to content

Commit

Permalink
server: set CLIENT_CONNECT_ATTRS (#975)
Browse files Browse the repository at this point in the history
* server: set CLIENT_CONNECT_ATTRS

* update comment/docs
  • Loading branch information
dveeden authored Jan 25, 2025
1 parent 7dc8271 commit d00dff7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ func (c *Conn) Charset() uint8 {
return c.charset
}

// Attributes returns the connection attributes.
// Note that this is only sent to the server if CLIENT_CONNECT_ATTRS is set.
func (c *Conn) Attributes() map[string]string {
return c.attributes
}
Expand Down
3 changes: 2 additions & 1 deletion server/server_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func NewDefaultServer() *Server {
serverVersion: "8.0.11",
protocolVersion: 10,
capability: CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB | CLIENT_PROTOCOL_41 |
CLIENT_TRANSACTIONS | CLIENT_SECURE_CONNECTION | CLIENT_PLUGIN_AUTH | CLIENT_SSL | CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA,
CLIENT_TRANSACTIONS | CLIENT_SECURE_CONNECTION | CLIENT_PLUGIN_AUTH | CLIENT_SSL |
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | CLIENT_CONNECT_ATTRS,
collationId: DEFAULT_COLLATION_ID,
defaultAuthMethod: AUTH_NATIVE_PASSWORD,
pubKey: getPublicKeyFromCert(certPem),
Expand Down

0 comments on commit d00dff7

Please sign in to comment.