1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug#57450 - mysql client enter in an infinite loop

if the standard input is a directory.

The problem is that mysql monitor try to read from stdin without
checking input source type.

The solution is to stop reading data from standard input if a call
to read(2) failed.

A new test case was added into mysql.test.
This commit is contained in:
Dmitry Shulga
2011-02-05 11:02:00 +06:00
parent 2dfb4c5ed3
commit 2f0ba4c3f8
4 changed files with 39 additions and 20 deletions

View File

@ -412,6 +412,12 @@ drop table t1;
--echo
--exec $MYSQL --skip-column-names --vertical test -e "select 1 as a"
#
# Bug#57450: mysql client enter in an infinite loop if the standard input is a directory
#
--error 1
--exec $MYSQL < .
--echo
--echo #