diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-09-19 15:18:19 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-09-19 15:18:19 +0500 |
commit | 44bffa0b0564a0d28558202d6cebbbea5eee1729 (patch) | |
tree | a720cfa7596cc981bc05e41c0c8c4a6103870eaa /include | |
parent | 4c63804846d1530b602a74ff30ad26df7645a94b (diff) | |
download | mariadb-git-44bffa0b0564a0d28558202d6cebbbea5eee1729.tar.gz |
Fixed that multibyte charsets didn't honor multibyte
sequence boundaries in functions LIKE and LOCATE in
the case of "binary" collation. Comparison was done
like if the strings were just a binary strings without
character set assumption.
Diffstat (limited to 'include')
-rw-r--r-- | include/m_ctype.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h index 8116058d687..603bb3cc2e5 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -115,12 +115,17 @@ typedef struct my_collation_handler_st int (*strcasecmp)(struct charset_info_st *, const char *, const char *); + int (*instr)(struct charset_info_st *, + const char *big, uint b_length, + const char *small, uint s_length); + /* Hash calculation */ void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, ulong *nr1, ulong *nr2); } MY_COLLATION_HANDLER; -extern MY_COLLATION_HANDLER my_collation_bin_handler; +extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; +extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; @@ -243,6 +248,10 @@ extern void my_hash_sort_simple(CHARSET_INFO *cs, extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length); +extern int my_instr_simple(struct charset_info_st *, + const char *big, uint b_length, + const char *small, uint s_length); + /* Functions for 8bit */ extern void my_caseup_str_8bit(CHARSET_INFO *, char *); @@ -307,6 +316,9 @@ int my_wildcmp_mb(CHARSET_INFO *, int escape, int w_one, int w_many); uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); +int my_instr_mb(struct charset_info_st *, + const char *big, uint b_length, + const char *small, uint s_length); extern my_bool my_parse_charset_xml(const char *bug, uint len, |