diff options
author | unknown <bar@mysql.com> | 2005-06-06 16:54:15 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-06-06 16:54:15 +0500 |
commit | e7300f13465e8e218351f61a4bef6b8133ed79b4 (patch) | |
tree | 901c99571e02ef1768a731b79400976f99f118e3 /strings/ctype-mb.c | |
parent | 29f18223aaec312d214658ffc59694a0ab6be6d7 (diff) | |
download | mariadb-git-e7300f13465e8e218351f61a4bef6b8133ed79b4.tar.gz |
Bug#8610: The ucs2_turkish_ci collation fails with upper('i')
UPPER/LOWER now can return a string with different length.
mi_test1.c:
Adding new arguments.
Many files:
Changeing caseup/casedn to return a result with different
length than argument.
sql_string.h:
Removing unused method,
mysql_priv.h:
Removing unused method
strings/ctype-big5.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-bin.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-cp932.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-czech.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-euc_kr.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-extra.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-eucjpms.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-gb2312.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-gbk.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-latin1.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-mb.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-simple.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-sjis.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-tis620.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-uca.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-ucs2.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-ujis.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-utf8.c:
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-win1250ch.c:
Changeing caseup/casedn to return a result with different length than argument.
sql/item_strfunc.cc:
Changeing caseup/casedn to return a result with different length than argument.
sql/item_strfunc.h:
Changeing caseup/casedn to return a result with different length than argument.
sql/mysql_priv.h:
Removing unused method
sql/sql_string.h:
Removing unused method,
client/sql_string.h:
Changeing caseup/casedn to return a result with different length than argument.
include/m_ctype.h:
Changeing caseup/casedn to return a result with different length than argument.
myisam/mi_test1.c:
Adding new arguments.
mysql-test/r/ctype_uca.result:
UPPER/LOWER now can return a string with different length.
mysql-test/t/ctype_uca.test:
UPPER/LOWER now can return a string with different length.
Diffstat (limited to 'strings/ctype-mb.c')
-rw-r--r-- | strings/ctype-mb.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index b3ec476b8f5..2d9f8b16bfc 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -57,40 +57,48 @@ void my_casedn_str_mb(CHARSET_INFO * cs, char *str) } } -void my_caseup_mb(CHARSET_INFO * cs, char *str, uint length) +uint my_caseup_mb(CHARSET_INFO * cs, char *src, uint srclen, + char *dst __attribute__((unused)), + uint dstlen __attribute__((unused))) { register uint32 l; - register char *end=str+length; - register uchar *map=cs->to_upper; - - while (str<end) + register char *srcend= src + srclen; + register uchar *map= cs->to_upper; + + DBUG_ASSERT(src == dst && srclen == dstlen); + while (src < srcend) { - if ((l=my_ismbchar(cs, str,end))) - str+=l; + if ((l=my_ismbchar(cs, src, srcend))) + src+= l; else { - *str=(char) map[(uchar)*str]; - str++; + *src=(char) map[(uchar) *src]; + src++; } } + return srclen; } -void my_casedn_mb(CHARSET_INFO * cs, char *str, uint length) +uint my_casedn_mb(CHARSET_INFO * cs, char *src, uint srclen, + char *dst __attribute__((unused)), + uint dstlen __attribute__((unused))) { register uint32 l; - register char *end=str+length; + register char *srcend= src + srclen; register uchar *map=cs->to_lower; - - while (str<end) + + DBUG_ASSERT(src == dst && srclen == dstlen); + while (src < srcend) { - if ((l=my_ismbchar(cs, str,end))) - str+=l; + if ((l= my_ismbchar(cs, src, srcend))) + src+= l; else { - *str=(char) map[(uchar)*str]; - str++; + *src= (char) map[(uchar)*src]; + src++; } } + return srclen; } int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) |