summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-09-28 15:46:09 +0500
committerunknown <bar@mysql.com>2005-09-28 15:46:09 +0500
commit1bdd8a6275cedf7c4e3dc431434bde359e023971 (patch)
tree0670f696120a98581eb7ce14d1a0fcc1e7250273 /client
parent0559f1e0124280bd8cecb98611364057914791ec (diff)
downloadmariadb-git-1bdd8a6275cedf7c4e3dc431434bde359e023971.tar.gz
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: Bug#13487 Japanese data inside a comment causes the syntax error Fixed not to copy multibyte characters to the target string if we are inside a comment. ,
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc16
1 files changed, 11 insertions, 5 deletions
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 == '\\')