summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <istruewing@stella.local>2008-01-15 12:51:51 +0100
committerunknown <istruewing@stella.local>2008-01-15 12:51:51 +0100
commit543cee3ea4119f9b00f38dd20adf2bad66e0f445 (patch)
tree68123483c78de9214bf60e7b6a71571d0be97b8c /storage
parent99e49a34d4eab1d110645edeafbb04044a15812b (diff)
parent18a7ec307977df75160e071b57355404a09e8e96 (diff)
downloadmariadb-git-543cee3ea4119f9b00f38dd20adf2bad66e0f445.tar.gz
Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into stella.local:/home2/mydev/mysql-5.1-axmrg mysql-test/t/myisam.test: Auto merged storage/myisam/mi_open.c: Auto merged mysql-test/r/myisam.result: Manual merge from 5.0
Diffstat (limited to 'storage')
-rw-r--r--storage/myisam/mi_open.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index a4f6e1291db..de42bdcd53d 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -815,8 +815,17 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo)
keyinfo->get_key= _mi_get_pack_key;
if (keyinfo->seg[0].flag & HA_PACK_KEY)
{ /* Prefix compression */
+ /*
+ _mi_prefix_search() compares end-space against ASCII blank (' ').
+ It cannot be used for character sets, that do not encode the
+ blank character like ASCII does. UCS2 is an example. All
+ character sets with a fixed width > 1 or a mimimum width > 1
+ cannot represent blank like ASCII does. In these cases we have
+ to use _mi_seq_search() for the search.
+ */
if (!keyinfo->seg->charset || use_strnxfrm(keyinfo->seg->charset) ||
- (keyinfo->seg->flag & HA_NULL_PART))
+ (keyinfo->seg->flag & HA_NULL_PART) ||
+ (keyinfo->seg->charset->mbminlen > 1))
keyinfo->bin_search=_mi_seq_search;
else
keyinfo->bin_search=_mi_prefix_search;