Change server version from char pointer to char array

With this change, it is no longer possible that the server version
is deallocated at the very moment it is read. There is still a race,
but it's mostly harmless.
This commit is contained in:
Johan Wikman
2017-06-19 13:40:18 +03:00
parent 32cd28daf2
commit 3e39ec906e
4 changed files with 39 additions and 42 deletions

View File

@ -224,8 +224,7 @@ int MySQLSendHandshake(DCB* dcb)
{
mysql_server_language = dcb->service->dbref->server->charset;
if (dcb->service->dbref->server->server_string &&
strstr(dcb->service->dbref->server->server_string, "10.2."))
if (strstr(dcb->service->dbref->server->version_string, "10.2."))
{
/** The backend servers support the extended capabilities */
is_maria = true;