summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-06-06 16:54:15 +0500
committerunknown <bar@mysql.com>2005-06-06 16:54:15 +0500
commite7300f13465e8e218351f61a4bef6b8133ed79b4 (patch)
tree901c99571e02ef1768a731b79400976f99f118e3 /include
parent29f18223aaec312d214658ffc59694a0ab6be6d7 (diff)
downloadmariadb-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 'include')
-rw-r--r--include/m_ctype.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 6f304f4ba43..8bb8e5c76df 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -44,6 +44,9 @@ typedef struct unicase_info_st
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 @@ typedef struct my_charset_handler_st
/* 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 @@ typedef struct charset_info_st
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 @@ extern uint my_instr_simple(struct charset_info_st *,
/* 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 @@ int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
/* 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 @@ my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
#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)))