Commit 9f00950d authored by Nirbhay Choubey's avatar Nirbhay Choubey

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.
parent 0f447810
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment