Bug #71109 Documentation for attributes as part of COM_CHANGE_USER is missing
Submitted: 8 Dec 2013 14:44 Modified: 12 Dec 2015 23:28
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[8 Dec 2013 14:44] Daniël van Eeden
Description:
For the connection attributes to be populated the client needs to send them in a COM_CHANGE_USER packet. 

http://dev.mysql.com/doc/refman/5.6/en/performance-schema-connection-attribute-tables.html
http://dev.mysql.com/doc/internals/en/com-change-user.html

How to repeat:
Read the docs of COM_CHANGE_USER.

Read send_change_user_packet() in sql-common/client.c and dump traffic between the client and the server.

Suggested fix:
Update documentation.
[8 Dec 2013 15:01] Daniël van Eeden
I've found some documentation:

http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Hands...
http://dev.mysql.com/doc/internals/en/capability-flags.html#flag-CLIENT_CONNECT_ATTRS

------
  if capabilities & CLIENT_CONNECT_ATTRS {
lenenc-int     length of all key-values
lenenc-str     key
lenenc-str     value
   if-more data in 'length of all key-values', more keys and value pairs
  }
------
[9 Dec 2013 20:02] Sveta Smirnova
Thank you for the report.

But our manual clearly says that these parameters should be passed to mysql_options4 call and its manual describes when and how this function should be called (http://dev.mysql.com/doc/refman/5.6/en/mysql-options4.html) Why do you need more explanation for these two attributes?

And, actually, client does not need to populate them together with COM_CHANGE_USER. User manual has example of the usage of connection attributes.
[9 Dec 2013 21:07] Daniël van Eeden
I want to understand the protocol level, not the API level.
[10 Dec 2013 16:17] Sveta Smirnova
Thank you for the feedback.

Request: "mention CLIENT_CONNECT_ATTRS" at http://dev.mysql.com/doc/internals/en/com-change-user.html verified as described.
[12 Dec 2015 23:28] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.