List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:December 20 2007 9:37pm
Subject:bk commit into 5.0 tree (df:1.2584) BUG#33057
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of df.  When df does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-20 21:37:21+01:00, df@stripped +1 -0
  BUG#33057 mysql command line client slows down and uses 100% CPU when restoring dump

  client/mysql.cc@stripped, 2007-12-20 21:37:19+01:00, df@stripped +1 -3
    BUG#33057, avoid calling strlen() *for every single character* in the client's input

diff -Nrup a/client/mysql.cc b/client/mysql.cc
--- a/client/mysql.cc	2007-12-13 11:49:10 +01:00
+++ b/client/mysql.cc	2007-12-20 21:37:19 +01:00
@@ -1272,9 +1272,7 @@ static bool add_line(String &buffer,char
   if (status.add_to_history && line[0] && not_in_history(line))
     add_history(line);
 #endif
-#ifdef USE_MB
   char *end_of_line=line+(uint) strlen(line);
-#endif
 
   for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
   {
@@ -1364,7 +1362,7 @@ static bool add_line(String &buffer,char
       }
     }
     else if (!*ml_comment && !*in_string &&
-             strlen(pos) >= 10 &&
+             (end_of_line - pos) >= 10 &&
              !my_strnncoll(charset_info, (uchar*) pos, 10,
                            (const uchar*) "delimiter ", 10))
     {
Thread
bk commit into 5.0 tree (df:1.2584) BUG#33057Daniel Fischer20 Dec