Skip to content

Commit 72d3676

Browse files
committed
remove workaround from MDEV-9409
1 parent e9a692f commit 72d3676

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

client/mysqltest.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -873,17 +873,10 @@ static char *my_fgets(char * s, int n, FILE * stream, int *len)
873873

874874
/*
875875
Wrapper for popen().
876-
On Windows, uses binary mode to workaround
877-
C runtime bug mentioned in MDEV-9409
878876
*/
879877
static FILE* my_popen(const char *cmd, const char *mode)
880878
{
881-
FILE *f= popen(cmd, mode);
882-
#ifdef _WIN32
883-
if (f)
884-
_setmode(fileno(f), O_BINARY);
885-
#endif
886-
return f;
879+
return popen(cmd, mode);
887880
}
888881

889882
#ifdef EMBEDDED_LIBRARY

mysql-test/main/perror-win.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MariaDB error code 150: Foreign key constraint is incorrectly formed
2-
Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
2+
Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
33
OS error code 23: Too many open files in system
4-
Win32 error code 23: Data error (cyclic redundancy check).
4+
Win32 error code 23: Data error (cyclic redundancy check).
55
MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
6-
Win32 error code 1062: The service has not been started.
6+
Win32 error code 1062: The service has not been started.
77
Illegal error code: 30000

sql/mysqld.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5728,17 +5728,11 @@ int mysqld_main(int argc, char **argv)
57285728
init_ssl();
57295729
network_init();
57305730

5731-
#ifdef __WIN__
5731+
#ifdef _WIN32
57325732
if (!opt_console)
57335733
{
57345734
FreeConsole(); // Remove window
57355735
}
5736-
5737-
if (fileno(stdin) >= 0)
5738-
{
5739-
/* Disable CRLF translation (MDEV-9409). */
5740-
_setmode(fileno(stdin), O_BINARY);
5741-
}
57425736
#endif
57435737

57445738
#ifdef WITH_WSREP

0 commit comments

Comments
 (0)