MXS-2115: Fix regression
The 5.5.5 prefix in the version strings was not added.
This commit is contained in:
@ -198,7 +198,15 @@ static char *gw_default_auth()
|
|||||||
|
|
||||||
std::string get_version_string(SERVICE* service)
|
std::string get_version_string(SERVICE* service)
|
||||||
{
|
{
|
||||||
std::string rval;
|
std::string rval = GW_MYSQL_VERSION;
|
||||||
|
|
||||||
|
if (service->version_string[0])
|
||||||
|
{
|
||||||
|
// User-defined version string, use it
|
||||||
|
rval = service->version_string;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
uint64_t intver = UINT64_MAX;
|
uint64_t intver = UINT64_MAX;
|
||||||
|
|
||||||
for (SERVER_REF* ref = service->dbref; ref; ref = ref->next)
|
for (SERVER_REF* ref = service->dbref; ref; ref = ref->next)
|
||||||
@ -209,11 +217,14 @@ std::string get_version_string(SERVICE* service)
|
|||||||
intver = ref->server->version;
|
intver = ref->server->version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the version string from service if no server version is available
|
// Older applications don't understand versions other than 5 and cause strange problems
|
||||||
if (rval.empty())
|
const char prefix[] = "5.5.5-";
|
||||||
|
|
||||||
|
if (strncmp(rval.c_str(), prefix, sizeof(prefix) - 1) != 0)
|
||||||
{
|
{
|
||||||
rval = service->version_string[0] ? service->version_string : GW_MYSQL_VERSION;
|
rval = prefix + rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
Reference in New Issue
Block a user