MXS-2115: Fix handshake version string

The intention was to send the lowest backend version string automatically
to the client instead of the default handshake version. This did not work
as the service version string was used instead of the server version.
This commit is contained in:
Markus Mäkelä
2018-10-26 11:01:03 +03:00
parent 262f1d7e47
commit 7e21e3aedd
3 changed files with 51 additions and 17 deletions

View File

@ -0,0 +1,21 @@
/**
* MXS-2115: Automatic version string detection doesn't work
*
* When servers are available, the backend server and Maxscale should return the
* same version string.
*/
#include "testconnections.h"
int main(int argc, char **argv)
{
TestConnections test(argc, argv);
test.repl->connect();
test.maxscales->connect();
std::string direct = mysql_get_server_info(test.repl->nodes[0]);
std::string mxs = mysql_get_server_info(test.maxscales->conn_rwsplit[0]);
test.expect(direct == mxs, "MaxScale sends wrong version: %s != %s", direct.c_str(), mxs.c_str());
return test.global_result;
}