Browse Source

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.
pull/104/head
Nirbhay Choubey 11 years ago
parent
commit
9f00950d2a
  1. 9
      sql/mysqld.cc

9
sql/mysqld.cc

@ -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

Loading…
Cancel
Save