-
Vladislav Vaintroub authored
Server uses gethostname() for the default base name for pid/log files. If a character is not representable in current ANSI encoding, gethostname replaces it with question mark. Thus, generated log file name would also contain a question mark. However, Windows forbids certain characters in filenames, among them '?'. This is described in MSDN article https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx At attempts to create the file via freopen() fails, thus server would not be able to start. The fix is to verify hostname and fall back to "mysql", if invalid characters are found.
f1aefd9d