diff options
author | Dmitry Shulga <Dmitry.Shulga@oracle.com> | 2011-02-05 11:02:00 +0600 |
---|---|---|
committer | Dmitry Shulga <Dmitry.Shulga@oracle.com> | 2011-02-05 11:02:00 +0600 |
commit | 2f0ba4c3f82a8c621c1efaae18911d9fa868ec64 (patch) | |
tree | 0081afb284ed8dce0f349971d24915910f875a70 /mysql-test/t | |
parent | 2dfb4c5ed33a7fbd7297fdf54097434370a7a1c7 (diff) | |
download | mariadb-git-2f0ba4c3f82a8c621c1efaae18911d9fa868ec64.tar.gz |
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.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/mysql.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 2dcc77a16c2..aa774036d10 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -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 # |