Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2303 05/06/01 11:30:59 jimw@stripped +1 -0
Fix hashcmp() to handle special case of zero length, which
resulted in the hostname cache being ineffective. Based on
patch from Jeremy Cole of Yahoo! (Bug #10931)
mysys/hash.c
1.43 05/06/01 11:30:56 jimw@stripped +20 -2
Fix hashcmp() to handle length == 0 as in 4.0, and document the
function, including this special case.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-10931
--- 1.42/mysys/hash.c 2005-03-07 01:27:17 -08:00
+++ 1.43/mysys/hash.c 2005-06-01 11:30:56 -07:00
@@ -262,7 +262,25 @@
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 @@
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));
}
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2303) BUG#10931 | Jim Winstead | 1 Jun |