From 9aa22c6eb42b01d8e20808cf83fc0bad46fd56f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 20 Feb 2017 15:32:11 +0200 Subject: [PATCH] Fix server version detection of 10.2 flags The code used the wrong version string. Instead of using the server version string, it used the service version string. --- .../modules/protocol/MySQL/MySQLClient/mysql_client.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c index 5f22ebfd1..4034eda36 100644 --- a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c +++ b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c @@ -232,21 +232,28 @@ int MySQLSendHandshake(DCB* dcb) int len_version_string = 0; int id_num; + bool is_maria = false; + if (dcb->service->dbref) { mysql_server_language = dcb->service->dbref->server->charset; + + if (dcb->service->dbref->server->server_string && + strstr(dcb->service->dbref->server->server_string, "10.2.")) + { + /** The backend servers support the extended capabilities */ + is_maria = true; + } } MySQLProtocol *protocol = DCB_PROTOCOL(dcb, MySQLProtocol); GWBUF *buf; - bool is_maria = false; /* get the version string from service property if available*/ if (dcb->service->version_string != NULL) { version_string = dcb->service->version_string; len_version_string = strlen(version_string); - is_maria = strstr(version_string, "10.2."); } else {