Below is the list of changes that have just been committed into a local
5.0 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1923 05/06/06 16:54:15 bar@stripped +28 -0
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
mysql-test/t/ctype_uca.test
1.11 05/06/06 16:52:04 bar@stripped +15 -0
UPPER/LOWER now can return a string with different length.
mysql-test/r/ctype_uca.result
1.14 05/06/06 16:51:32 bar@stripped +24 -0
UPPER/LOWER now can return a string with different length.
myisam/mi_test1.c
1.26 05/06/06 16:50:49 bar@stripped +8 -3
Adding new arguments.
include/m_ctype.h
1.112 05/06/06 16:50:37 bar@stripped +18 -8
Changeing caseup/casedn to return a result with different length than argument.
client/sql_string.h
1.14 05/06/06 16:50:24 bar@stripped +0 -2
Changeing caseup/casedn to return a result with different length than argument.
sql/sql_string.h
1.58 05/06/06 16:49:47 bar@stripped +0 -2
Removing unused method,
sql/mysql_priv.h
1.306 05/06/06 16:49:26 bar@stripped +2 -1
Removing unused method
sql/item_strfunc.h
1.91 05/06/06 16:49:23 bar@stripped +20 -7
Changeing caseup/casedn to return a result with different length than argument.
sql/item_strfunc.cc
1.230 05/06/06 16:49:16 bar@stripped +18 -17
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-win1250ch.c
1.50 05/06/06 16:48:58 bar@stripped +3 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-utf8.c
1.90 05/06/06 16:48:56 bar@stripped +230 -21
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-ujis.c
1.65 05/06/06 16:48:54 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-ucs2.c
1.48 05/06/06 16:48:53 bar@stripped +42 -21
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-uca.c
1.35 05/06/06 16:48:50 bar@stripped +102 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-tis620.c
1.86 05/06/06 16:48:49 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-sjis.c
1.82 05/06/06 16:48:47 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-simple.c
1.69 05/06/06 16:48:45 bar@stripped +22 -10
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-mb.c
1.44 05/06/06 16:48:43 bar@stripped +25 -17
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-latin1.c
1.44 05/06/06 16:48:42 bar@stripped +9 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-gbk.c
1.72 05/06/06 16:48:40 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-gb2312.c
1.59 05/06/06 16:48:38 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-eucjpms.c
1.8 05/06/06 16:48:36 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-extra.c
1.18 05/06/06 16:48:34 bar@stripped +3 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-euc_kr.c
1.62 05/06/06 16:48:32 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-czech.c
1.59 05/06/06 16:48:30 bar@stripped +3 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-cp932.c
1.7 05/06/06 16:48:28 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-bin.c
1.62 05/06/06 16:48:24 bar@stripped +9 -3
Changeing caseup/casedn to return a result with different length than argument.
strings/ctype-big5.c
1.78 05/06/06 16:47:50 bar@stripped +6 -0
Changeing caseup/casedn to return a result with different length than argument.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.0.turk
--- 1.13/client/sql_string.h 2005-05-26 22:54:23 +05:00
+++ 1.14/client/sql_string.h 2005-06-06 16:50:24 +05:00
@@ -260,8 +260,6 @@
}
bool fill(uint32 max_length,char fill);
void strip_sp();
- inline void caseup() { my_caseup(str_charset,Ptr,str_length); }
- inline void casedn() { my_casedn(str_charset,Ptr,str_length); }
friend int sortcmp(const String *a,const String *b, CHARSET_INFO *cs);
friend int stringcmp(const String *a,const String *b);
friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
--- 1.111/include/m_ctype.h 2005-05-06 11:55:26 +05:00
+++ 1.112/include/m_ctype.h 2005-06-06 16:50:37 +05:00
@@ -44,6 +44,9 @@
uint16 sort;
} MY_UNICASE_INFO;
+extern MY_UNICASE_INFO *my_unicase_default[256];
+extern MY_UNICASE_INFO *my_unicase_turkish[256];
+
#define MY_CS_ILSEQ 0
#define MY_CS_ILUNI 0
#define MY_CS_TOOSMALL -1
@@ -164,8 +167,10 @@
/* Functions for case and sort convertion */
void (*caseup_str)(struct charset_info_st *, char *);
void (*casedn_str)(struct charset_info_st *, char *);
- void (*caseup)(struct charset_info_st *, char *, uint);
- void (*casedn)(struct charset_info_st *, char *, uint);
+ uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+ uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
/* Charset dependant snprintf() */
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
@@ -216,9 +221,12 @@
uint16 **sort_order_big;
uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni;
+ MY_UNICASE_INFO **caseinfo;
uchar *state_map;
uchar *ident_map;
uint strxfrm_multiply;
+ uchar caseup_multiply;
+ uchar casedn_multiply;
uint mbminlen;
uint mbmaxlen;
uint16 min_sort_char;
@@ -286,8 +294,10 @@
/* Functions for 8bit */
extern void my_caseup_str_8bit(CHARSET_INFO *, char *);
extern void my_casedn_str_8bit(CHARSET_INFO *, char *);
-extern void my_caseup_8bit(CHARSET_INFO *, char *, uint);
-extern void my_casedn_8bit(CHARSET_INFO *, char *, uint);
+extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
@@ -359,8 +369,10 @@
/* Functions for multibyte charsets */
extern void my_caseup_str_mb(CHARSET_INFO *, char *);
extern void my_casedn_str_mb(CHARSET_INFO *, char *);
-extern void my_caseup_mb(CHARSET_INFO *, char *, uint);
-extern void my_casedn_mb(CHARSET_INFO *, char *, uint);
+extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
int my_wildcmp_mb(CHARSET_INFO *,
@@ -441,8 +453,6 @@
#define my_mbcharlen(s, a) 1
#endif
-#define my_caseup(s, a, l) ((s)->cset->caseup((s), (a), (l)))
-#define my_casedn(s, a, l) ((s)->cset->casedn((s), (a), (l)))
#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
--- 1.25/myisam/mi_test1.c 2004-12-18 07:19:15 +04:00
+++ 1.26/myisam/mi_test1.c 2005-06-06 16:50:49 +05:00
@@ -471,20 +471,25 @@
ptr=blob_key;
memcpy_fixed(pos+4,&ptr,sizeof(char*)); /* Store pointer to new key */
if (keyinfo[0].seg[0].type != HA_KEYTYPE_NUM)
- my_casedn(default_charset_info,blob_key,length);
+ default_charset_info->cset->casedn(default_charset_info,
+ blob_key, length, blob_key, length);
pos+=recinfo[1].length;
}
else if (recinfo[1].type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(recinfo[1].length-1);
uint length= pack_length == 1 ? (uint) *(uchar*) pos : uint2korr(pos);
- my_casedn(default_charset_info,pos+pack_length,length);
+ default_charset_info->cset->casedn(default_charset_info,
+ pos + pack_length, length,
+ pos + pack_length, length);
pos+=recinfo[1].length;
}
else
{
if (keyinfo[0].seg[0].type != HA_KEYTYPE_NUM)
- my_casedn(default_charset_info,pos,keyinfo[0].seg[0].length);
+ default_charset_info->cset->casedn(default_charset_info,
+ pos, keyinfo[0].seg[0].length,
+ pos, keyinfo[0].seg[0].length);
pos+=recinfo[1].length;
}
--- 1.229/sql/item_strfunc.cc 2005-06-02 10:49:57 +05:00
+++ 1.230/sql/item_strfunc.cc 2005-06-06 16:49:16 +05:00
@@ -902,7 +902,7 @@
}
-String *Item_func_lcase::val_str(String *str)
+String *Item_str_conv::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res;
@@ -912,24 +912,25 @@
return 0; /* purecov: inspected */
}
null_value=0;
- res=copy_if_not_alloced(str,res,res->length());
- res->casedn();
- return res;
-}
-
-
-String *Item_func_ucase::val_str(String *str)
-{
- DBUG_ASSERT(fixed == 1);
- String *res;
- if (!(res=args[0]->val_str(str)))
+ if (multiply == 1)
{
- null_value=1; /* purecov: inspected */
- return 0; /* purecov: inspected */
+ uint len;
+ res= copy_if_not_alloced(str,res,res->length());
+ len= converter(collation.collation, (char*) res->ptr(), res->length(),
+ (char*) res->ptr(), res->length());
+ DBUG_ASSERT(len <= res->length());
+ res->length(len);
+ }
+ else
+ {
+ uint len= res->length() * multiply;
+ tmp_value.alloc(len);
+ tmp_value.set_charset(collation.collation);
+ len= converter(collation.collation, (char*) res->ptr(), res->length(),
+ (char*) tmp_value.ptr(), len);
+ tmp_value.length(len);
+ res= &tmp_value;
}
- null_value=0;
- res=copy_if_not_alloced(str,res,res->length());
- res->caseup();
return res;
}
--- 1.90/sql/item_strfunc.h 2005-05-18 23:06:31 +05:00
+++ 1.91/sql/item_strfunc.h 2005-06-06 16:49:23 +05:00
@@ -133,13 +133,14 @@
class Item_str_conv :public Item_str_func
{
+protected:
+ uint multiply;
+ uint (*converter)(CHARSET_INFO *cs, char *src, uint srclen,
+ char *dst, uint dstlen);
+ String tmp_value;
public:
Item_str_conv(Item *item) :Item_str_func(item) {}
- void fix_length_and_dec()
- {
- collation.set(args[0]->collation);
- max_length = args[0]->max_length;
- }
+ String *val_str(String *);
};
@@ -147,16 +148,28 @@
{
public:
Item_func_lcase(Item *item) :Item_str_conv(item) {}
- String *val_str(String *);
const char *func_name() const { return "lcase"; }
+ void fix_length_and_dec()
+ {
+ collation.set(args[0]->collation);
+ multiply= collation.collation->casedn_multiply;
+ converter= collation.collation->cset->casedn;
+ max_length= args[0]->max_length * multiply;
+ }
};
class Item_func_ucase :public Item_str_conv
{
public:
Item_func_ucase(Item *item) :Item_str_conv(item) {}
- String *val_str(String *);
const char *func_name() const { return "ucase"; }
+ void fix_length_and_dec()
+ {
+ collation.set(args[0]->collation);
+ multiply= collation.collation->caseup_multiply;
+ converter= collation.collation->cset->caseup;
+ max_length= args[0]->max_length * multiply;
+ }
};
--- 1.305/sql/mysql_priv.h 2005-06-01 13:52:58 +05:00
+++ 1.306/sql/mysql_priv.h 2005-06-06 16:49:26 +05:00
@@ -1354,7 +1354,8 @@
inline void table_case_convert(char * name, uint length)
{
if (lower_case_table_names)
- my_casedn(files_charset_info, name, length);
+ files_charset_info->cset->casedn(files_charset_info,
+ name, length, name, length);
}
inline const char *table_case_name(HA_CREATE_INFO *info, const char *name)
--- 1.57/sql/sql_string.h 2005-05-09 14:26:47 +05:00
+++ 1.58/sql/sql_string.h 2005-06-06 16:49:47 +05:00
@@ -261,8 +261,6 @@
}
bool fill(uint32 max_length,char fill);
void strip_sp();
- inline void caseup() { my_caseup(str_charset,Ptr,str_length); }
- inline void casedn() { my_casedn(str_charset,Ptr,str_length); }
friend int sortcmp(const String *a,const String *b, CHARSET_INFO *cs);
friend int stringcmp(const String *a,const String *b);
friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
--- 1.77/strings/ctype-big5.c 2005-05-14 13:36:56 +05:00
+++ 1.78/strings/ctype-big5.c 2005-06-06 16:47:50 +05:00
@@ -6384,9 +6384,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -6412,9 +6415,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.58/strings/ctype-czech.c 2005-05-05 21:13:08 +05:00
+++ 1.59/strings/ctype-czech.c 2005-06-06 16:48:30 +05:00
@@ -618,9 +618,12 @@
NULL, /* sort_order_big*/
tab_8859_2_uni, /* tab_to_uni */
idx_uni_8859_2, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
4, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
--- 1.61/strings/ctype-euc_kr.c 2005-05-05 21:13:08 +05:00
+++ 1.62/strings/ctype-euc_kr.c 2005-06-06 16:48:32 +05:00
@@ -8696,9 +8696,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -8724,9 +8727,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.58/strings/ctype-gb2312.c 2005-05-05 21:13:08 +05:00
+++ 1.59/strings/ctype-gb2312.c 2005-06-06 16:48:38 +05:00
@@ -5747,9 +5747,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -5774,9 +5777,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.71/strings/ctype-gbk.c 2005-05-05 21:13:09 +05:00
+++ 1.72/strings/ctype-gbk.c 2005-06-06 16:48:40 +05:00
@@ -9994,9 +9994,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -10021,9 +10024,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.81/strings/ctype-sjis.c 2005-05-10 02:59:25 +05:00
+++ 1.82/strings/ctype-sjis.c 2005-06-06 16:48:47 +05:00
@@ -4681,9 +4681,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -4708,9 +4711,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.85/strings/ctype-tis620.c 2005-05-05 21:13:09 +05:00
+++ 1.86/strings/ctype-tis620.c 2005-06-06 16:48:49 +05:00
@@ -983,9 +983,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
4, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
@@ -1010,9 +1013,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
--- 1.64/strings/ctype-ujis.c 2005-05-05 21:13:09 +05:00
+++ 1.65/strings/ctype-ujis.c 2005-06-06 16:48:54 +05:00
@@ -8566,9 +8566,12 @@
NULL, /* contractions */
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
@@ -8594,9 +8597,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
--- 1.34/strings/ctype-uca.c 2005-05-05 21:13:09 +05:00
+++ 1.35/strings/ctype-uca.c 2005-06-06 16:48:50 +05:00
@@ -8049,9 +8049,12 @@
uca_weight, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8076,9 +8079,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8103,9 +8109,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8130,9 +8139,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8157,9 +8169,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8184,9 +8199,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8211,9 +8229,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8238,9 +8259,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8265,9 +8289,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8292,9 +8319,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_turkish, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8319,9 +8349,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8347,9 +8380,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8374,9 +8410,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8401,9 +8440,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8428,9 +8470,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8456,9 +8501,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8484,9 +8532,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
9, /* min_sort_char */
@@ -8559,9 +8610,12 @@
uca_weight, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8587,9 +8641,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8614,9 +8671,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8641,9 +8701,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8668,9 +8731,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8695,9 +8761,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8722,9 +8791,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8749,9 +8821,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8776,9 +8851,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8803,9 +8881,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_turkish, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 2, /* caseup_multiply */
+ 2, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8830,9 +8911,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8858,9 +8942,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8885,9 +8972,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8912,9 +9002,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8939,9 +9032,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8966,9 +9062,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
@@ -8993,9 +9092,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
8, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
9, /* min_sort_char */
--- 1.61/strings/ctype-bin.c 2005-05-05 21:13:08 +05:00
+++ 1.62/strings/ctype-bin.c 2005-06-06 16:48:24 +05:00
@@ -208,10 +208,13 @@
{
}
-static void my_case_bin(CHARSET_INFO *cs __attribute__((unused)),
- char *str __attribute__((unused)),
- uint length __attribute__((unused)))
+static uint my_case_bin(CHARSET_INFO *cs __attribute__((unused)),
+ char *src __attribute__((unused)),
+ uint srclen,
+ char *dst __attribute__((unused)),
+ uint dstlen __attribute__((unused)))
{
+ return srclen;
}
@@ -526,9 +529,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
--- 1.17/strings/ctype-extra.c 2004-06-12 20:36:50 +05:00
+++ 1.18/strings/ctype-extra.c 2005-06-06 16:48:34 +05:00
@@ -33,9 +33,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
0, /* strxfrm_mul */
+ 0, /* caseup_mul */
+ 0, /* casedn_mul */
0, /* mbminlen */
0, /* mbmaxlen */
0, /* min_sort_ord */
--- 1.43/strings/ctype-latin1.c 2005-05-05 21:13:09 +05:00
+++ 1.44/strings/ctype-latin1.c 2005-06-06 16:48:42 +05:00
@@ -424,9 +424,12 @@
NULL, /* sort_order_big*/
cs_to_uni, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
@@ -719,9 +722,12 @@
NULL, /* sort_order_big*/
cs_to_uni, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
2, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
@@ -747,9 +753,12 @@
NULL, /* sort_order_big*/
cs_to_uni, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
--- 1.47/strings/ctype-ucs2.c 2005-05-14 20:19:55 +05:00
+++ 1.48/strings/ctype-ucs2.c 2005-06-06 16:48:53 +05:00
@@ -30,7 +30,6 @@
#define EILSEQ ENOENT
#endif
-extern MY_UNICASE_INFO *uni_plane[256];
static uchar ctype_ucs2[] = {
0,
@@ -113,20 +112,26 @@
}
-static void my_caseup_ucs2(CHARSET_INFO *cs, char *s, uint slen)
+static uint my_caseup_ucs2(CHARSET_INFO *cs, char *src, uint srclen,
+ char *dst __attribute__((unused)),
+ uint dstlen __attribute__((unused)))
{
my_wc_t wc;
int res;
- char *e=s+slen;
-
- while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e))>0
)
- {
- int plane = (wc>>8) & 0xFF;
- wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc;
- if (res != my_uni_ucs2(cs,wc,(uchar*)s,(uchar*)e))
+ char *srcend= src + srclen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ DBUG_ASSERT(src == dst && srclen == dstlen);
+
+ while ((src < srcend) &&
+ (res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
+ {
+ int plane= (wc>>8) & 0xFF;
+ wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc;
+ if (res != my_uni_ucs2(cs, wc, (uchar*) src, (uchar*) srcend))
break;
- s+=res;
+ src+= res;
}
+ return srclen;
}
@@ -136,6 +141,7 @@
my_wc_t wc;
int res;
const uchar *e=s+slen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while (e > s+1 && e[-1] == ' ' && e[-2] == '\0')
e-= 2;
@@ -160,22 +166,26 @@
-static void my_casedn_ucs2(CHARSET_INFO *cs, char *s, uint slen)
+static uint my_casedn_ucs2(CHARSET_INFO *cs, char *src, uint srclen,
+ char *dst __attribute__((unused)),
+ uint dstlen __attribute__((unused)))
{
my_wc_t wc;
int res;
- char *e=s+slen;
-
- while ((s < e) && (res=my_ucs2_uni(cs, &wc, (uchar*)s, (uchar*)e))>0)
- {
- int plane = (wc>>8) & 0xFF;
- wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc;
- if (res != my_uni_ucs2(cs, wc, (uchar*)s, (uchar*)e))
- {
+ char *srcend= src + srclen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ DBUG_ASSERT(src == dst && srclen == dstlen);
+
+ while ((src < srcend) &&
+ (res= my_ucs2_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
+ {
+ int plane= (wc>>8) & 0xFF;
+ wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc;
+ if (res != my_uni_ucs2(cs, wc, (uchar*) src, (uchar*) srcend))
break;
- }
- s+=res;
+ src+= res;
}
+ return srclen;
}
static void my_casedn_str_ucs2(CHARSET_INFO *cs __attribute__((unused)),
@@ -193,6 +203,7 @@
my_wc_t s_wc,t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while ( s < se && t < te )
{
@@ -256,6 +267,7 @@
{
const uchar *se, *te;
uint minlen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
/* extra safety to make sure the lengths are even numbers */
slen&= ~1;
@@ -305,6 +317,7 @@
my_wc_t s_wc,t_wc;
const char *se=s+len;
const char *te=t+len;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while ( s < se && t < te )
{
@@ -352,6 +365,7 @@
int plane;
uchar *de = dst + dstlen;
const uchar *se = src + srclen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while( src < se && dst < de )
{
@@ -1310,6 +1324,7 @@
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many)
{
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend,
escape,w_one,w_many,uni_plane);
}
@@ -1596,9 +1611,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -1623,9 +1641,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
2, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.43/strings/ctype-mb.c 2005-05-05 21:13:09 +05:00
+++ 1.44/strings/ctype-mb.c 2005-06-06 16:48:43 +05:00
@@ -57,40 +57,48 @@
}
}
-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)
--- 1.68/strings/ctype-simple.c 2005-05-05 21:13:09 +05:00
+++ 1.69/strings/ctype-simple.c 2005-06-06 16:48:45 +05:00
@@ -201,18 +201,28 @@
str++;
}
-void my_caseup_8bit(CHARSET_INFO * cs, char *str, uint length)
-{
- register uchar *map=cs->to_upper;
- for ( ; length>0 ; length--, str++)
- *str= (char) map[(uchar)*str];
-}
-
-void my_casedn_8bit(CHARSET_INFO * cs, char *str, uint length)
+uint my_caseup_8bit(CHARSET_INFO * cs, char *src, uint srclen,
+ char *dst __attribute__((unused)),
+ uint dstlen __attribute__((unused)))
+{
+ uint srclen0= srclen;
+ register uchar *map= cs->to_upper;
+ DBUG_ASSERT(src == dst && srclen == dstlen);
+ for ( ; srclen > 0 ; srclen--, src++)
+ *src= (char) map[(uchar) *src];
+ return srclen0;
+}
+
+uint my_casedn_8bit(CHARSET_INFO * cs, char *src, uint srclen,
+ char *dst __attribute__((unused)),
+ uint dstlen __attribute__((unused)))
{
+ uint srclen0= srclen;
register uchar *map=cs->to_lower;
- for ( ; length>0 ; length--, str++)
- *str= (char) map[(uchar) *str];
+ DBUG_ASSERT(src == dst && srclen == dstlen);
+ for ( ; srclen > 0 ; srclen--, src++)
+ *src= (char) map[(uchar) *src];
+ return srclen0;
}
int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t)
@@ -1303,6 +1313,8 @@
static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(uint))
{
+ cs->caseup_multiply= 1;
+ cs->casedn_multiply= 1;
return create_fromuni(cs, alloc);
}
--- 1.89/strings/ctype-utf8.c 2005-05-05 21:13:09 +05:00
+++ 1.90/strings/ctype-utf8.c 2005-06-06 16:48:56 +05:00
@@ -172,6 +172,8 @@
{0x00DE,0x00FE,0x00DE}, {0x0178,0x00FF,0x0059}
};
+
+
static MY_UNICASE_INFO plane01[]={
{0x0100,0x0101,0x0041}, {0x0100,0x0101,0x0041},
{0x0102,0x0103,0x0041}, {0x0102,0x0103,0x0041},
@@ -1482,7 +1484,7 @@
{0xFFFE,0xFFFE,0xFFFE}, {0xFFFF,0xFFFF,0xFFFF}
};
-MY_UNICASE_INFO *uni_plane[256]={
+MY_UNICASE_INFO *my_unicase_default[256]={
plane00, plane01, plane02, plane03, plane04, plane05, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1520,6 +1522,186 @@
/*
+ Turkish lower/upper mapping:
+ 1. LOWER(0x0049 LATIN CAPITAL LETTER I) ->
+ 0x0131 LATIN SMALL LETTER DOTLESS I
+ 2. UPPER(0x0069 LATIN SMALL LETTER I) ->
+ 0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
+*/
+
+static MY_UNICASE_INFO turk00[]=
+{
+ {0x0000,0x0000,0x0000}, {0x0001,0x0001,0x0001},
+ {0x0002,0x0002,0x0002}, {0x0003,0x0003,0x0003},
+ {0x0004,0x0004,0x0004}, {0x0005,0x0005,0x0005},
+ {0x0006,0x0006,0x0006}, {0x0007,0x0007,0x0007},
+ {0x0008,0x0008,0x0008}, {0x0009,0x0009,0x0009},
+ {0x000A,0x000A,0x000A}, {0x000B,0x000B,0x000B},
+ {0x000C,0x000C,0x000C}, {0x000D,0x000D,0x000D},
+ {0x000E,0x000E,0x000E}, {0x000F,0x000F,0x000F},
+ {0x0010,0x0010,0x0010}, {0x0011,0x0011,0x0011},
+ {0x0012,0x0012,0x0012}, {0x0013,0x0013,0x0013},
+ {0x0014,0x0014,0x0014}, {0x0015,0x0015,0x0015},
+ {0x0016,0x0016,0x0016}, {0x0017,0x0017,0x0017},
+ {0x0018,0x0018,0x0018}, {0x0019,0x0019,0x0019},
+ {0x001A,0x001A,0x001A}, {0x001B,0x001B,0x001B},
+ {0x001C,0x001C,0x001C}, {0x001D,0x001D,0x001D},
+ {0x001E,0x001E,0x001E}, {0x001F,0x001F,0x001F},
+ {0x0020,0x0020,0x0020}, {0x0021,0x0021,0x0021},
+ {0x0022,0x0022,0x0022}, {0x0023,0x0023,0x0023},
+ {0x0024,0x0024,0x0024}, {0x0025,0x0025,0x0025},
+ {0x0026,0x0026,0x0026}, {0x0027,0x0027,0x0027},
+ {0x0028,0x0028,0x0028}, {0x0029,0x0029,0x0029},
+ {0x002A,0x002A,0x002A}, {0x002B,0x002B,0x002B},
+ {0x002C,0x002C,0x002C}, {0x002D,0x002D,0x002D},
+ {0x002E,0x002E,0x002E}, {0x002F,0x002F,0x002F},
+ {0x0030,0x0030,0x0030}, {0x0031,0x0031,0x0031},
+ {0x0032,0x0032,0x0032}, {0x0033,0x0033,0x0033},
+ {0x0034,0x0034,0x0034}, {0x0035,0x0035,0x0035},
+ {0x0036,0x0036,0x0036}, {0x0037,0x0037,0x0037},
+ {0x0038,0x0038,0x0038}, {0x0039,0x0039,0x0039},
+ {0x003A,0x003A,0x003A}, {0x003B,0x003B,0x003B},
+ {0x003C,0x003C,0x003C}, {0x003D,0x003D,0x003D},
+ {0x003E,0x003E,0x003E}, {0x003F,0x003F,0x003F},
+ {0x0040,0x0040,0x0040}, {0x0041,0x0061,0x0041},
+ {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043},
+ {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045},
+ {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047},
+ {0x0048,0x0068,0x0048}, {0x0049,0x0131,0x0049},
+ {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B},
+ {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D},
+ {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F},
+ {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051},
+ {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053},
+ {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055},
+ {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057},
+ {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059},
+ {0x005A,0x007A,0x005A}, {0x005B,0x005B,0x005B},
+ {0x005C,0x005C,0x005C}, {0x005D,0x005D,0x005D},
+ {0x005E,0x005E,0x005E}, {0x005F,0x005F,0x005F},
+ {0x0060,0x0060,0x0060}, {0x0041,0x0061,0x0041},
+ {0x0042,0x0062,0x0042}, {0x0043,0x0063,0x0043},
+ {0x0044,0x0064,0x0044}, {0x0045,0x0065,0x0045},
+ {0x0046,0x0066,0x0046}, {0x0047,0x0067,0x0047},
+ {0x0048,0x0068,0x0048}, {0x0130,0x0069,0x0049},
+ {0x004A,0x006A,0x004A}, {0x004B,0x006B,0x004B},
+ {0x004C,0x006C,0x004C}, {0x004D,0x006D,0x004D},
+ {0x004E,0x006E,0x004E}, {0x004F,0x006F,0x004F},
+ {0x0050,0x0070,0x0050}, {0x0051,0x0071,0x0051},
+ {0x0052,0x0072,0x0052}, {0x0053,0x0073,0x0053},
+ {0x0054,0x0074,0x0054}, {0x0055,0x0075,0x0055},
+ {0x0056,0x0076,0x0056}, {0x0057,0x0077,0x0057},
+ {0x0058,0x0078,0x0058}, {0x0059,0x0079,0x0059},
+ {0x005A,0x007A,0x005A}, {0x007B,0x007B,0x007B},
+ {0x007C,0x007C,0x007C}, {0x007D,0x007D,0x007D},
+ {0x007E,0x007E,0x007E}, {0x007F,0x007F,0x007F},
+ {0x0080,0x0080,0x0080}, {0x0081,0x0081,0x0081},
+ {0x0082,0x0082,0x0082}, {0x0083,0x0083,0x0083},
+ {0x0084,0x0084,0x0084}, {0x0085,0x0085,0x0085},
+ {0x0086,0x0086,0x0086}, {0x0087,0x0087,0x0087},
+ {0x0088,0x0088,0x0088}, {0x0089,0x0089,0x0089},
+ {0x008A,0x008A,0x008A}, {0x008B,0x008B,0x008B},
+ {0x008C,0x008C,0x008C}, {0x008D,0x008D,0x008D},
+ {0x008E,0x008E,0x008E}, {0x008F,0x008F,0x008F},
+ {0x0090,0x0090,0x0090}, {0x0091,0x0091,0x0091},
+ {0x0092,0x0092,0x0092}, {0x0093,0x0093,0x0093},
+ {0x0094,0x0094,0x0094}, {0x0095,0x0095,0x0095},
+ {0x0096,0x0096,0x0096}, {0x0097,0x0097,0x0097},
+ {0x0098,0x0098,0x0098}, {0x0099,0x0099,0x0099},
+ {0x009A,0x009A,0x009A}, {0x009B,0x009B,0x009B},
+ {0x009C,0x009C,0x009C}, {0x009D,0x009D,0x009D},
+ {0x009E,0x009E,0x009E}, {0x009F,0x009F,0x009F},
+ {0x00A0,0x00A0,0x00A0}, {0x00A1,0x00A1,0x00A1},
+ {0x00A2,0x00A2,0x00A2}, {0x00A3,0x00A3,0x00A3},
+ {0x00A4,0x00A4,0x00A4}, {0x00A5,0x00A5,0x00A5},
+ {0x00A6,0x00A6,0x00A6}, {0x00A7,0x00A7,0x00A7},
+ {0x00A8,0x00A8,0x00A8}, {0x00A9,0x00A9,0x00A9},
+ {0x00AA,0x00AA,0x00AA}, {0x00AB,0x00AB,0x00AB},
+ {0x00AC,0x00AC,0x00AC}, {0x00AD,0x00AD,0x00AD},
+ {0x00AE,0x00AE,0x00AE}, {0x00AF,0x00AF,0x00AF},
+ {0x00B0,0x00B0,0x00B0}, {0x00B1,0x00B1,0x00B1},
+ {0x00B2,0x00B2,0x00B2}, {0x00B3,0x00B3,0x00B3},
+ {0x00B4,0x00B4,0x00B4}, {0x039C,0x00B5,0x039C},
+ {0x00B6,0x00B6,0x00B6}, {0x00B7,0x00B7,0x00B7},
+ {0x00B8,0x00B8,0x00B8}, {0x00B9,0x00B9,0x00B9},
+ {0x00BA,0x00BA,0x00BA}, {0x00BB,0x00BB,0x00BB},
+ {0x00BC,0x00BC,0x00BC}, {0x00BD,0x00BD,0x00BD},
+ {0x00BE,0x00BE,0x00BE}, {0x00BF,0x00BF,0x00BF},
+ {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041},
+ {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041},
+ {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041},
+ {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043},
+ {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045},
+ {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045},
+ {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049},
+ {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049},
+ {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E},
+ {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F},
+ {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F},
+ {0x00D6,0x00F6,0x004F}, {0x00D7,0x00D7,0x00D7},
+ {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055},
+ {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055},
+ {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059},
+ {0x00DE,0x00FE,0x00DE}, {0x00DF,0x00DF,0x00DF},
+ {0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041},
+ {0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041},
+ {0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041},
+ {0x00C6,0x00E6,0x00C6}, {0x00C7,0x00E7,0x0043},
+ {0x00C8,0x00E8,0x0045}, {0x00C9,0x00E9,0x0045},
+ {0x00CA,0x00EA,0x0045}, {0x00CB,0x00EB,0x0045},
+ {0x00CC,0x00EC,0x0049}, {0x00CD,0x00ED,0x0049},
+ {0x00CE,0x00EE,0x0049}, {0x00CF,0x00EF,0x0049},
+ {0x00D0,0x00F0,0x00D0}, {0x00D1,0x00F1,0x004E},
+ {0x00D2,0x00F2,0x004F}, {0x00D3,0x00F3,0x004F},
+ {0x00D4,0x00F4,0x004F}, {0x00D5,0x00F5,0x004F},
+ {0x00D6,0x00F6,0x004F}, {0x00F7,0x00F7,0x00F7},
+ {0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055},
+ {0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055},
+ {0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059},
+ {0x00DE,0x00FE,0x00DE}, {0x0178,0x00FF,0x0059}
+};
+
+
+
+MY_UNICASE_INFO *my_unicase_turkish[256]=
+{
+ turk00, plane01, plane02, plane03, plane04, plane05, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, plane1E, plane1F,
+ NULL, plane21, NULL, NULL, plane24, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, planeFF
+};
+
+
+
+/*
** Compare string against string with wildcard
** This function is used in UTF8 and UCS2
**
@@ -1907,20 +2089,26 @@
}
-static void my_caseup_utf8(CHARSET_INFO *cs, char *s, uint slen)
+static uint my_caseup_utf8(CHARSET_INFO *cs, char *src, uint srclen,
+ char *dst, uint dstlen)
{
my_wc_t wc;
- int res;
- char *e=s+slen;
+ int srcres, dstres;
+ char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
- while ((s < e) && (res=my_utf8_uni(cs,&wc, (uchar *)s, (uchar*)e))>0
)
+ while ((src < srcend) &&
+ (srcres= my_utf8_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
- int plane = (wc>>8) & 0xFF;
- wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc;
- if (res != my_uni_utf8(cs,wc,(uchar*)s,(uchar*)e))
+ int plane= (wc>>8) & 0xFF;
+ wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].toupper : wc;
+ if ((dstres= my_uni_utf8(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
- s+=res;
+ src+= srcres;
+ dst+= dstres;
}
+ return dst - dst0;
}
static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, uint slen,
@@ -1929,6 +2117,7 @@
my_wc_t wc;
int res;
const uchar *e=s+slen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
/*
Remove end space. We have to do this to be able to compare
@@ -1952,31 +2141,37 @@
static void my_caseup_str_utf8(CHARSET_INFO * cs, char * s)
{
- my_caseup_utf8(cs, s, strlen(s));
+ uint len= strlen(s);
+ my_caseup_utf8(cs, s, len, s, len);
}
-static void my_casedn_utf8(CHARSET_INFO *cs, char *s, uint slen)
+static uint my_casedn_utf8(CHARSET_INFO *cs, char *src, uint srclen,
+ char *dst, uint dstlen)
{
my_wc_t wc;
- int res;
- char *e=s+slen;
+ int srcres, dstres;
+ char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
- while ((s < e) && (res=my_utf8_uni(cs, &wc, (uchar*)s, (uchar*)e))>0)
+ while ((src < srcend) &&
+ (srcres= my_utf8_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0)
{
- int plane = (wc>>8) & 0xFF;
- wc = uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc;
- if (res != my_uni_utf8(cs, wc, (uchar*)s, (uchar*)e))
- {
+ int plane= (wc>>8) & 0xFF;
+ wc= uni_plane[plane] ? uni_plane[plane][wc & 0xFF].tolower : wc;
+ if ((dstres= my_uni_utf8(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
- }
- s+=res;
+ src+= srcres;
+ dst+= dstres;
}
+ return dst - dst0;
}
static void my_casedn_str_utf8(CHARSET_INFO *cs, char * s)
{
- my_casedn_utf8(cs, s, strlen(s));
+ uint len= strlen(s);
+ my_casedn_utf8(cs, s, len, s, len);
}
@@ -1989,6 +2184,7 @@
my_wc_t s_wc,t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while ( s < se && t < te )
{
@@ -2057,6 +2253,7 @@
int s_res, t_res, res;
my_wc_t s_wc,t_wc;
const uchar *se= s+slen, *te= t+tlen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
diff_if_only_endspace_difference= 0;
@@ -2144,6 +2341,7 @@
static
int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t)
{
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
@@ -2228,6 +2426,7 @@
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many)
{
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend,
escape,w_one,w_many,uni_plane);
}
@@ -2249,6 +2448,7 @@
uchar *de= dst + dstlen;
uchar *de_beg= de - 1;
const uchar *se = src + srclen;
+ MY_UNICASE_INFO **uni_plane= cs->caseinfo;
while (dst < de_beg)
{
@@ -2367,9 +2567,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
@@ -2395,9 +2598,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
@@ -2561,9 +2767,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
--- 1.49/strings/ctype-win1250ch.c 2005-05-05 21:13:09 +05:00
+++ 1.50/strings/ctype-win1250ch.c 2005-06-06 16:48:58 +05:00
@@ -652,9 +652,12 @@
NULL, /* sort_order_big*/
tab_cp1250_uni, /* tab_to_uni */
idx_uni_cp1250, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
2, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
1, /* mbmaxlen */
0, /* min_sort_char */
--- 1.13/mysql-test/r/ctype_uca.result 2005-04-04 17:54:45 +05:00
+++ 1.14/mysql-test/r/ctype_uca.result 2005-06-06 16:51:32 +05:00
@@ -2396,3 +2396,27 @@
utf8_unicode_ci 61
utf8_unicode_ci 6120
drop table t1;
+CREATE TABLE t1 (id int, a varchar(30) character set utf8);
+INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131);
+INSERT INTO t1 VALUES (3, _ucs2 0x00690069), (4, _ucs2 0x01300049);
+INSERT INTO t1 VALUES (5, _ucs2 0x01300130), (6, _ucs2 0x00490049);
+SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu
+FROM t1 ORDER BY id;
+a la l ll u lu
+ıi 3 ıi 3 II 2
+ıı 4 ıı 4 II 2
+ii 2 ii 2 II 2
+İI 3 ii 2 İI 3
+İİ 4 ii 2 İİ 4
+II 2 ii 2 II 2
+ALTER TABLE t1 MODIFY a VARCHAR(30) character set utf8 collate utf8_turkish_ci;
+SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu
+FROM t1 ORDER BY id;
+a la l ll u lu
+ıi 3 ıi 3 Iİ 3
+ıı 4 ıı 4 II 2
+ii 2 ii 2 İİ 4
+İI 3 iı 3 İI 3
+İİ 4 ii 2 İİ 4
+II 2 ıı 4 II 2
+DROP TABLE t1;
--- 1.10/mysql-test/t/ctype_uca.test 2005-01-13 18:11:55 +04:00
+++ 1.11/mysql-test/t/ctype_uca.test 2005-06-06 16:52:04 +05:00
@@ -455,3 +455,18 @@
SET collation_connection='utf8_unicode_ci';
-- source include/ctype_filesort.inc
+
+#
+# Check UPPER/LOWER changeing length
+#
+# Result shorter than argument
+CREATE TABLE t1 (id int, a varchar(30) character set utf8);
+INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131);
+INSERT INTO t1 VALUES (3, _ucs2 0x00690069), (4, _ucs2 0x01300049);
+INSERT INTO t1 VALUES (5, _ucs2 0x01300130), (6, _ucs2 0x00490049);
+SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu
+FROM t1 ORDER BY id;
+ALTER TABLE t1 MODIFY a VARCHAR(30) character set utf8 collate utf8_turkish_ci;
+SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu
+FROM t1 ORDER BY id;
+DROP TABLE t1;
--- 1.6/strings/ctype-cp932.c 2005-05-05 21:13:08 +05:00
+++ 1.7/strings/ctype-cp932.c 2005-06-06 16:48:28 +05:00
@@ -5512,9 +5512,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
@@ -5539,9 +5542,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
2, /* mbmaxlen */
0, /* min_sort_char */
--- 1.7/strings/ctype-eucjpms.c 2005-05-05 21:13:08 +05:00
+++ 1.8/strings/ctype-eucjpms.c 2005-06-06 16:48:36 +05:00
@@ -8698,9 +8698,12 @@
NULL, /* contractions */
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
@@ -8726,9 +8729,12 @@
NULL, /* sort_order_big*/
NULL, /* tab_to_uni */
NULL, /* tab_from_uni */
+ my_unicase_default, /* caseinfo */
NULL, /* state_map */
NULL, /* ident_map */
1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
1, /* mbminlen */
3, /* mbmaxlen */
0, /* min_sort_char */
| Thread |
|---|
| • bk commit into 5.0 tree (bar:1.1923) BUG#8610 | bar | 6 Jun |