diff options
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index 7d1c733b116..eb3e0e8d1a7 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1084,6 +1084,17 @@ void append_unescaped(String *res, const char *pos, uint length) for (; pos != end ; pos++) { +#if defined(USE_MB) && MYSQL_VERSION_ID < 40100 + uint mblen; + if (use_mb(default_charset_info) && + (mblen= my_ismbchar(default_charset_info, pos, end))) + { + res->append(pos, mblen); + pos+= mblen; + continue; + } +#endif + switch (*pos) { case 0: /* Must be escaped for 'mysql' */ res->append('\\'); @@ -1109,6 +1120,7 @@ void append_unescaped(String *res, const char *pos, uint length) res->append(*pos); break; } + pos++; } res->append('\''); } |