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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user