summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authordf@pippilotta.erinye.com <>2007-12-20 21:37:21 +0100
committerdf@pippilotta.erinye.com <>2007-12-20 21:37:21 +0100
commitf7527b7856012dfda9f6552e344eebabfe9439aa (patch)
treebc0e858cda1071572638961e1b87b453acdb69f1 /client
parent7bd4ac4df7bc17c40ec2bdca88397219441a8054 (diff)
downloadmariadb-git-f7527b7856012dfda9f6552e344eebabfe9439aa.tar.gz
BUG#33057 mysql command line client slows down and uses 100% CPU when restoring dump
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 999a37e0f7e..6744600aadb 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1272,9 +1272,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
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 *line,char *in_string,
}
}
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))
{