List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:February 9 2011 6:58am
Subject:bzr push into mysql-5.5 branch (Dmitry.Shulga:3320 to 3321) Bug#57450
View as plain text  
 3321 Dmitry Shulga	2011-02-09 [merge]
      Automerge from mysql-5.1 for follow-up bug#57450.

    modified:
      client/mysql.cc
      client/readline.cc
 3320 Vasil Dimov	2011-02-08 [merge]
      Merge mysql-5.1 -> mysql-5.5 (empty)

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2011-02-05 05:04:15 +0000
+++ b/client/mysql.cc	2011-02-09 06:50:11 +0000
@@ -1127,6 +1127,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);

=== modified file 'client/readline.cc'
--- a/client/readline.cc	2011-02-05 05:04:15 +0000
+++ b/client/readline.cc	2011-02-09 06:50:11 +0000
@@ -18,6 +18,7 @@
 #include <my_global.h>
 #include <my_sys.h>
 #include <m_string.h>
+#include <my_dir.h>
 #include "my_readline.h"
 
 static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
@@ -30,6 +31,13 @@ static char *intern_read_line(LINE_BUFFE
 LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
 {
   LINE_BUFFER *line_buff;
+  MY_STAT input_file_stat;
+
+  if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
+      MY_S_ISDIR(input_file_stat.st_mode) ||
+      MY_S_ISBLK(input_file_stat.st_mode))
+    return 0;
+
   if (!(line_buff=(LINE_BUFFER*)
         my_malloc(sizeof(*line_buff),MYF(MY_WME | MY_ZEROFILL))))
     return 0;


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20110209065011-xcf53n62lwki8mgu.bundle
Thread
bzr push into mysql-5.5 branch (Dmitry.Shulga:3320 to 3321) Bug#57450Dmitry Shulga9 Feb
  • RE: bzr push into mysql-5.5 branch (Dmitry.Shulga:3320 to 3321) Bug#57450Vladislav Vaintroub9 Feb
    • Re: bzr push into mysql-5.5 branch (Dmitry.Shulga:3320 to 3321) Bug#57450Dmitry Shulga9 Feb