diff options
author | unknown <jimw@mysql.com> | 2005-06-09 19:27:45 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-06-09 19:27:45 -0700 |
commit | a3fe14096397ddd8ce7095aad9361c25090569ca (patch) | |
tree | 21b83bd4a16f0ba1a0620910f0f0e0e6e265983c /mysys/hash.c | |
parent | 967256ebd7d3214092535217f41cff0d7a7f6e60 (diff) | |
parent | cec24f77462bdee9a6f042149953fe2466068259 (diff) | |
download | mariadb-git-a3fe14096397ddd8ce7095aad9361c25090569ca.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysys/hash.c:
Auto merged
sql/ha_heap.h:
Auto merged
configure.in:
Resolve conflicts from 4.1
mysql-test/r/heap.result:
Update results
mysql-test/t/heap.test:
Merge from 4.1
Diffstat (limited to 'mysys/hash.c')
-rw-r--r-- | mysys/hash.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index fe27b5fcb6d..28f8797288c 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -262,7 +262,25 @@ static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink) return; } - /* Compare a key in a record to a whole key. Return 0 if identical */ +/* + Compare a key in a record to a whole key. Return 0 if identical + + SYNOPSIS + hashcmp() + hash hash table + pos position of hash record to use in comparison + key key for comparison + length length of key + + NOTES: + If length is 0, comparison is done using the length of the + record being compared against. + + RETURN + < 0 key of record < key + = 0 key of record == key + > 0 key of record > key + */ static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length) { @@ -270,7 +288,7 @@ static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length) byte *rec_key= (byte*) hash_key(hash,pos->data,&rec_keylength,1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, - (uchar*) key, length)); + (uchar*) key, rec_keylength)); } |