summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-06-26 16:37:02 -0700
committerunknown <igor@olga.mysql.com>2007-06-26 16:37:02 -0700
commit39ef7a533ed82a2a686ec46bbdfec206d4520520 (patch)
tree9601e52cc5c9b761133f3c0033a5553e7bdca4ae /myisam
parent69f82e256378eb4a3c1ed5d193e203c959e974b8 (diff)
parent0127c1a30faaf04be32837306a88c0908a0cbbe9 (diff)
downloadmariadb-git-39ef7a533ed82a2a686ec46bbdfec206d4520520.tar.gz
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29087
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_key.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c
index b203286d544..377972b5a5f 100644
--- a/myisam/mi_key.c
+++ b/myisam/mi_key.c
@@ -252,16 +252,16 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
if (keyseg->flag & HA_SPACE_PACK)
{
uchar *end=pos+length;
- if (type != HA_KEYTYPE_NUM)
- {
- while (end > pos && end[-1] == ' ')
- end--;
- }
- else
+ if (type == HA_KEYTYPE_NUM)
{
while (pos < end && pos[0] == ' ')
pos++;
}
+ else if (type != HA_KEYTYPE_BINARY)
+ {
+ while (end > pos && end[-1] == ' ')
+ end--;
+ }
k_length-=length;
length=(uint) (end-pos);
FIX_LENGTH(cs, pos, length, char_length);