Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files

WIN32 compilation fixes: define ETIMEDOUT only if not available and
fix typos and add a missing parameter.
This commit is contained in:
Davi Arnaut 2011-01-07 17:28:06 -02:00
commit 844d6ed4b2
2 changed files with 6 additions and 4 deletions

View file

@ -103,17 +103,17 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
#if defined(_WIN32)
static FILE *my_win_freopen(const char *path, FILE *stream)
static FILE *my_win_freopen(const char *path, const char *mode, FILE *stream)
{
int handle_fd, fd= _fileno(stream);
HANDLE osfh;
DBUG_ASSERT(filename && stream);
DBUG_ASSERT(path && stream);
/* Services don't have stdout/stderr on Windows, so _fileno returns -1. */
if (fd < 0)
{
if (!freopen(filename, mode, stream))
if (!freopen(path, mode, stream))
return NULL;
fd= _fileno(stream);