1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-7631 : Invalid WSREP_SST rows appear in mysqld-bin.index file

Try not to release 0 (STDIN_FILENO) file descriptor as it can
incorrectly get reused by streams opened later.
This commit is contained in:
Nirbhay Choubey
2015-06-24 23:25:22 -04:00
parent 0f4478105f
commit 9f00950d2a

View File

@@ -6278,7 +6278,14 @@ int mysqld_main(int argc, char **argv)
(char*) "" : mysqld_unix_port),
mysqld_port,
MYSQL_COMPILATION_COMMENT);
fclose(stdin);
// try to keep fd=0 busy
if (!freopen(IF_WIN("NUL","/dev/null"), "r", stdin))
{
// fall back on failure
fclose(stdin);
}
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
Service.SetRunning();
#endif