diff options
author | monty@mysql.com <> | 2005-06-07 15:09:50 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-06-07 15:09:50 +0300 |
commit | 795f20e024ab7b36c3d4eeba2e85fa8fd07df196 (patch) | |
tree | 6008e5a08df8ef83512207e84777b2e34d2927c1 | |
parent | 6cc77486b7862f0ef47a021fe2bc92c5e5754448 (diff) | |
parent | 1c725ff797a7453d924aa56bafa4e8f5b163fc7c (diff) | |
download | mariadb-git-795f20e024ab7b36c3d4eeba2e85fa8fd07df196.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
-rw-r--r-- | myisam/mi_key.c | 6 | ||||
-rw-r--r-- | myisam/mi_rnext_same.c | 4 | ||||
-rw-r--r-- | mysql-test/r/ctype_utf8.result | 3 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 1 |
4 files changed, 9 insertions, 5 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 6a8d88f1117..9df22889b22 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -84,8 +84,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, pos= (byte*) record+keyseg->start; if (keyseg->flag & HA_SPACE_PACK) { - FIX_LENGTH(cs, pos, length, char_length); - end= pos + char_length; + end= pos + length; if (type != HA_KEYTYPE_NUM) { while (end > pos && end[-1] == ' ') @@ -96,7 +95,8 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, while (pos < end && pos[0] == ' ') pos++; } - char_length= (uint) (end - pos); + length=(uint) (end-pos); + FIX_LENGTH(cs, pos, length, char_length); store_key_length_inc(key,char_length); memcpy((byte*) key,(byte*) pos,(size_t) char_length); key+=char_length; diff --git a/myisam/mi_rnext_same.c b/myisam/mi_rnext_same.c index 06408f57a3f..4d770258a72 100644 --- a/myisam/mi_rnext_same.c +++ b/myisam/mi_rnext_same.c @@ -68,8 +68,8 @@ int mi_rnext_same(MI_INFO *info, byte *buf) info->lastkey_length,SEARCH_BIGGER, info->s->state.key_root[inx]))) break; - if (ha_key_cmp(keyinfo->seg,info->lastkey2,info->lastkey, - info->last_rkey_length, SEARCH_FIND, ¬_used)) + if (ha_key_cmp(keyinfo->seg, info->lastkey, info->lastkey2, + info->last_rkey_length, SEARCH_FIND, ¬_used)) { error=1; my_errno=HA_ERR_END_OF_FILE; diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index ac421ea1717..29b18f0431c 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -901,4 +901,7 @@ insert into t1 values (2,'Durban'); select * from t1 where city = 'Durban'; id city 2 Durban +select * from t1 where city = 'Durban '; +id city +2 Durban drop table t1; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index a281558e5a1..3c49b2a47f7 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -744,4 +744,5 @@ create table t1 ( insert into t1 values (1,'Durban North'); insert into t1 values (2,'Durban'); select * from t1 where city = 'Durban'; +select * from t1 where city = 'Durban '; drop table t1; |