From ceb541e4bc441433bc64317dc42dfce7ed6f4a28 Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Wed, 28 Sep 2005 15:46:09 +0500 Subject: Bug#13487 Japanese data inside a comment causes the syntax error mysql.cc: Fixed not to copy multibyte characters to the target string if we are inside a comment. --- client/mysql.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'client/mysql.cc') diff --git a/client/mysql.cc b/client/mysql.cc index e73d627d67a..06b869be495 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1157,11 +1157,17 @@ static bool add_line(String &buffer,char *line,char *in_string, #ifdef USE_MB int l; if (use_mb(charset_info) && - (l = my_ismbchar(charset_info, pos, strend))) { - while (l--) - *out++ = *pos++; - pos--; - continue; + (l= my_ismbchar(charset_info, pos, strend))) + { + if (!*ml_comment) + { + while (l--) + *out++ = *pos++; + pos--; + } + else + pos+= l - 1; + continue; } #endif if (!*ml_comment && inchar == '\\') -- cgit v1.2.1