diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-23 18:38:27 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-23 18:38:27 +0100 |
commit | 66f2fd9d6109d2240c655408322c28f8ad829051 (patch) | |
tree | 4de70d98bf438e372e1b73c5e179846ca768e6c8 /client | |
parent | c85c2f01d0fedcc76b11e2ec647d42d088901c2c (diff) | |
parent | 685f2d409d33318e0044f32a3b275093435afb80 (diff) | |
download | mariadb-git-66f2fd9d6109d2240c655408322c28f8ad829051.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
BitKeeper/etc/collapsed:
auto-union
configure.in:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/extra/rpl_tests/rpl_deadlock.test:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/windows.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/windows.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_parse.cc:
Auto merged
BitKeeper/deleted/.del-ps_not_windows.result:
Delete: mysql-test/r/ps_not_windows.result
BitKeeper/deleted/.del-ps_not_windows.test:
Delete: mysql-test/t/ps_not_windows.test
mysql-test/mysql-test-run.pl:
Manual merge
mysql-test/r/rpl_deadlock_innodb.result:
Manual merge
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index ab94c415db7..660be6bce50 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1360,6 +1360,21 @@ static int dump_local_log_entries(const char* logname) } else // reading from stdin; { + /* + Windows opens stdin in text mode by default. Certain characters + such as CTRL-Z are interpeted as events and the read() method + will stop. CTRL-Z is the EOF marker in Windows. to get past this + you have to open stdin in binary mode. Setmode() is used to set + stdin in binary mode. Errors on setting this mode result in + halting the function and printing an error message to stderr. + */ +#if defined (__WIN__) || (_WIN64) + if (_setmode(fileno(stdin), O_BINARY) == -1) + { + fprintf(stderr, "Could not set binary mode on stdin.\n"); + return 1; + } +#endif if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0, 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE))) return 1; |