From c46e20f6c1275df5890838f92dc070fc7de99f63 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Wed, 9 Feb 2011 12:46:12 +0600 Subject: Follow up fix for bug#57450. batch_readline_init() was modified - return an error if the input source is a directory or a block device. This follow-up is necessary because on some platforms, such as Solaris, call to read() from directory may be successful. --- client/mysql.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client/mysql.cc') diff --git a/client/mysql.cc b/client/mysql.cc index b19aaf61e58..e7e7b244a49 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1131,6 +1131,8 @@ int main(int argc,char *argv[]) if (status.batch && !status.line_buff && !(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin))) { + put_info("Can't initialize batch_readline - may be the input source is " + "a directory or a block device.", INFO_ERROR, 0); free_defaults(defaults_argv); my_end(0); exit(1); -- cgit v1.2.1