1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Dmitry Shulga
2011-02-09 12:46:12 +06:00
parent de90b6dcb4
commit 107b46070d
2 changed files with 10 additions and 0 deletions

View File

@ -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);