diff options
author | unknown <bar@mysql.com> | 2005-07-06 17:16:22 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-07-06 17:16:22 +0500 |
commit | b5a9c8ce8ba5d274c34421c95a855c28c12e59b5 (patch) | |
tree | 83522047b7cb27d9ec7bf9c57e42c0106b550c58 /strings | |
parent | 3a235fbe54984f61ca7a6c325c9c778c681865dd (diff) | |
download | mariadb-git-b5a9c8ce8ba5d274c34421c95a855c28c12e59b5.tar.gz |
ctype_innodb_like.inc:
New BitKeeper file ``mysql-test/include/ctype_innodb_like.inc''
Many files:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
ctype_innodb_like.inc:
new file
mysql-test/r/ctype_big5.result:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/r/ctype_cp932.result:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/r/ctype_sjis.result:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/r/ctype_ujis.result:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/t/ctype_big5.test:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/t/ctype_cp932.test:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/t/ctype_sjis.test:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/t/ctype_ujis.test:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
strings/ctype-big5.c:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
strings/ctype-cp932.c:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
strings/ctype-gbk.c:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
strings/ctype-simple.c:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
strings/ctype-sjis.c:
bug#11650: LIKE pattern matching using prefix index doesn't return correct result
min and max values were too long in the case of prefix key.
Fix my_like_range functions not to exceed prefix length.
mysql-test/include/ctype_innodb_like.inc:
New BitKeeper file ``mysql-test/include/ctype_innodb_like.inc''
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-big5.c | 7 | ||||
-rw-r--r-- | strings/ctype-cp932.c | 7 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 7 | ||||
-rw-r--r-- | strings/ctype-simple.c | 8 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 7 |
5 files changed, 31 insertions, 5 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 52886116ff2..ff4ce6fdb51 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -392,9 +392,14 @@ static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { - const char *end=ptr+ptr_length; + const char *end; char *min_org=min_str; char *min_end=min_str+res_length; + uint charlen= my_charpos(cs, ptr, ptr+ptr_length, res_length/cs->mbmaxlen); + + if (charlen < ptr_length) + ptr_length= charlen; + end= ptr + ptr_length; for (; ptr != end && min_str != min_end ; ptr++) { diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c index d9e3bbd5866..377b5aa9871 100644 --- a/strings/ctype-cp932.c +++ b/strings/ctype-cp932.c @@ -324,9 +324,14 @@ static my_bool my_like_range_cp932(CHARSET_INFO *cs __attribute__((unused)), uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { - const char *end=ptr+ptr_length; + const char *end; char *min_org=min_str; char *min_end=min_str+res_length; + uint charlen= my_charpos(cs, ptr, ptr+ptr_length, res_length/cs->mbmaxlen); + + if (charlen < ptr_length) + ptr_length= charlen; + end= ptr + ptr_length; while (ptr < end && min_str < min_end) { if (ismbchar_cp932(cs, ptr, end)) { diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 9daa9f90f3c..89d28320fe1 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2705,9 +2705,14 @@ static my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { - const char *end=ptr+ptr_length; + const char *end; char *min_org=min_str; char *min_end=min_str+res_length; + uint charlen= my_charpos(cs, ptr, ptr+ptr_length, res_length/cs->mbmaxlen); + + if (charlen < ptr_length) + ptr_length= charlen; + end= ptr + ptr_length; for (; ptr != end && min_str != min_end ; ptr++) { diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index bd5131b7448..9e3a328ec26 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -997,9 +997,15 @@ my_bool my_like_range_simple(CHARSET_INFO *cs, char *min_str,char *max_str, uint *min_length,uint *max_length) { - const char *end=ptr+ptr_length; + const char *end; char *min_org=min_str; char *min_end=min_str+res_length; +#ifdef USE_MB + uint charlen= my_charpos(cs, ptr, ptr+ptr_length, res_length/cs->mbmaxlen); + if (charlen < ptr_length) + ptr_length= charlen; +#endif + end= ptr + ptr_length; for (; ptr != end && min_str != min_end ; ptr++) { diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index b018e148ffe..7f34ee3fa2d 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -322,9 +322,14 @@ static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { - const char *end=ptr+ptr_length; + const char *end; char *min_org=min_str; char *min_end=min_str+res_length; + uint charlen= my_charpos(cs, ptr, ptr+ptr_length, res_length/cs->mbmaxlen); + + if (charlen < ptr_length) + ptr_length= charlen; + end= ptr + ptr_length; while (ptr < end && min_str < min_end) { if (ismbchar_sjis(cs, ptr, end)) { |