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:
parent
04dd05b262
commit
8f0e4a3034
@ -220,10 +220,9 @@ std::string get_version_string(SERVICE* service)
|
||||
}
|
||||
|
||||
// Older applications don't understand versions other than 5 and cause strange problems
|
||||
const char prefix[] = "5.5.5-";
|
||||
|
||||
if (strncmp(rval.c_str(), prefix, sizeof(prefix) - 1) != 0)
|
||||
if (rval[0] != '5')
|
||||
{
|
||||
const char prefix[] = "5.5.5-";
|
||||
rval = prefix + rval;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user