MXS-2232: Fix version string prefix check
The prefix was always added even when the original version would've been acceptable. For example, a version string of 5.5.40 would get converted to 5.5.5-5.5.40 which is quite confusing for older client applications.
This commit is contained in:
@ -220,10 +220,9 @@ std::string get_version_string(SERVICE* service)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Older applications don't understand versions other than 5 and cause strange problems
|
// Older applications don't understand versions other than 5 and cause strange problems
|
||||||
const char prefix[] = "5.5.5-";
|
if (rval[0] != '5')
|
||||||
|
|
||||||
if (strncmp(rval.c_str(), prefix, sizeof(prefix) - 1) != 0)
|
|
||||||
{
|
{
|
||||||
|
const char prefix[] = "5.5.5-";
|
||||||
rval = prefix + rval;
|
rval = prefix + rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user