Bug #82931 X protocol: Please provide a formal definition of the MYSQL41 authentication
Submitted: 9 Sep 2016 18:02 Modified: 10 Sep 2016 4:49
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7.15 OS:Any
Assigned to: CPU Architecture:Any
Tags: documentation, x protocol

[9 Sep 2016 18:02] Simon Mudd
Description:
The X protocol by default uses the MYSQL41 authentication exchange in a similar way which has been done in the legacy protocol.

Yet strangely enough I see no documentation which describes this protocol.

When writing a new driver for something like the X protocol it saves a considerable amount of time if there's a formal specification with appropriate simple test cases.

How to repeat:
I'm unaware of any formal specification for MYSQL41 authentication. Obviously there are various implementations and not only by Oracle, Sun, MySQL etc and I guess this has therefore required people to study the source code to figure out how this works.

Note: this authentication mechanism also includes information on the default database to connect to, which is something which is not apparent or even mentioned for example here:

https://dev.mysql.com/doc/internals/en/x-protocol-authentication-authentication.html

Suggested fix:
Document the MYSQL41 exchange more formally providing a few sample/test input cases with real values which can be used for validating implementations.

Ensure that this includes the selection of a sample database.
[9 Sep 2016 18:05] Simon Mudd
Sample test values which can be used for validation are most useful.
[10 Sep 2016 4:49] MySQL Verification Team
Hello Simon,

Thank you for the report.

Thanks,
Umesh