diff options
author | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-02-03 18:14:23 +0400 |
---|---|---|
committer | unknown <bar@bar.intranet.mysql.r18.ru> | 2004-02-03 18:14:23 +0400 |
commit | 1a7af0059d80e83e0bf9b83dca0f02998f7bc74b (patch) | |
tree | 002634aaf11d4ae989c004140dedacccf4c24d2e /sql/item_cmpfunc.cc | |
parent | dad4c5adad87477870dd5227eb601541b81a6331 (diff) | |
download | mariadb-git-1a7af0059d80e83e0bf9b83dca0f02998f7bc74b.tar.gz |
Bug #2619 ucs2 LIKE comparison fails in some cases
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 0b9c7f8d92a..59fd180c79f 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -2197,11 +2197,11 @@ void Item_func_like::turboBM_compute_suffixes(int *suff) int f = 0; int g = plm1; int *const splm1 = suff + plm1; - CHARSET_INFO *cs=system_charset_info; // QQ Needs to be fixed + CHARSET_INFO *cs= cmp.cmp_collation.collation; *splm1 = pattern_len; - if (cmp.cmp_collation.collation == &my_charset_bin) + if (cs == &my_charset_bin) { int i; for (i = pattern_len - 2; i >= 0; i--) @@ -2299,12 +2299,12 @@ void Item_func_like::turboBM_compute_bad_character_shifts() int *end = bmBc + alphabet_size; int j; const int plm1 = pattern_len - 1; - CHARSET_INFO *cs=system_charset_info; // QQ Needs to be fixed + CHARSET_INFO *cs= cmp.cmp_collation.collation; for (i = bmBc; i < end; i++) *i = pattern_len; - if (cmp.cmp_collation.collation == &my_charset_bin) + if (cs == &my_charset_bin) { for (j = 0; j < plm1; j++) bmBc[(uint) (uchar) pattern[j]] = plm1 - j; @@ -2329,13 +2329,13 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const int shift = pattern_len; int j = 0; int u = 0; - CHARSET_INFO *cs= cmp.cmp_collation.collation; // QQ Needs to be fixed + CHARSET_INFO *cs= cmp.cmp_collation.collation; const int plm1= pattern_len - 1; const int tlmpl= text_len - pattern_len; /* Searching */ - if (cmp.cmp_collation.collation == &my_charset_bin) + if (cs == &my_charset_bin) { while (j <= tlmpl) { |