summaryrefslogtreecommitdiff
path: root/sql/sql_string.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-23 12:41:28 +0400
committerunknown <bar@mysql.com>2006-03-23 12:41:28 +0400
commit8c8e0567c7b093ef97835a0bb513d064ddbed325 (patch)
treefefc8015db210132d0d029a6d3c30bafda73dc37 /sql/sql_string.cc
parent5b34888ce43ca76a8d1840f45e0452de1535a728 (diff)
parenta464e01713d19d358eb7feab2cfdf88bb274d5df (diff)
downloadmariadb-git-8c8e0567c7b093ef97835a0bb513d064ddbed325.tar.gz
Merge mysql.com:/usr/home/bar/mysql-4.1.b15376
into mysql.com:/usr/home/bar/mysql-5.0 BitKeeper/deleted/.del-ctype-cp932.c: Auto merged mysql-test/t/ctype_ujis.test: Auto merged sql/sql_string.cc: Auto merged strings/ctype-big5.c: Auto merged strings/ctype-bin.c: Auto merged strings/ctype-euc_kr.c: Auto merged strings/ctype-gb2312.c: Auto merged strings/ctype-gbk.c: Auto merged strings/ctype-latin1.c: Auto merged strings/ctype-simple.c: Auto merged strings/ctype-sjis.c: Auto merged strings/ctype-tis620.c: Auto merged strings/ctype-ucs2.c: Auto merged strings/ctype-ujis.c: Auto merged strings/ctype-utf8.c: Auto merged include/m_ctype.h: After merge fix. mysql-test/r/ctype_ujis.result: After merge fix
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r--sql/sql_string.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index fd7bca7ec21..79228be8a76 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -819,8 +819,18 @@ copy_and_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
from++;
wc= '?';
}
+ else if (cnvres > MY_CS_TOOSMALL)
+ {
+ /*
+ A correct multibyte sequence detected
+ But it doesn't have Unicode mapping.
+ */
+ error_count++;
+ from+= (-cnvres);
+ wc= '?';
+ }
else
- break; // Impossible char.
+ break; // Not enough characters
outp:
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)