-
Georgi Kodinov authored
COM_CHANGE_USER was always handled like an implicit request to change the client plugin, so that the client can re-use the same code path for both normal login and COM_CHANGE_USER. However this doesn't really work well with old clients because they don't understand the request to change a client plugin. Fixed by implementing a special state in the code (and old client issuing COM_CHANGE_USER). In this state the server parses the COM_CHANGE_USER package and pushes back the password hash, the user name and the database to the input stream in the same order that the native password server side plugin expects. As a result it replies with an OK/FAIL just like the old server does thus making the new server compatible with older clients. No test case added, since it would requre an old client binary. Tested using accounts with and without passwords. Tested with a correct and incorrect password.
ef7982fd