diff options
author | Michael Widenius <monty@mysql.com> | 2009-04-25 13:05:32 +0300 |
---|---|---|
committer | Michael Widenius <monty@mysql.com> | 2009-04-25 13:05:32 +0300 |
commit | e726e587ec6287472dd450dbcbddf07669b3e028 (patch) | |
tree | e644a6134bfe892512501c648c938a2e93f08130 /mysys/hash.c | |
parent | 210a412522b10115d34b431c66acf403faab7bfe (diff) | |
parent | 086185089e6c7bef58dde49b02950689af9fee63 (diff) | |
download | mariadb-git-e726e587ec6287472dd450dbcbddf07669b3e028.tar.gz |
Merged with mysql-5.1 tree.
client/mysqltest.cc:
Manually merged
configure.in:
Manually merged
mysql-test/r/variables.result:
Manually merged
mysql-test/t/variables.test:
Manually merged
mysys/my_pread.c:
Manually merged
mysys/my_read.c:
Manually merged
sql/mysqld.cc:
Manually merged
storage/csv/ha_tina.h:
Manually merged
storage/myisam/ha_myisam.cc:
Manually merged
storage/myisam/mi_check.c:
Manually merged
storage/myisam/mi_search.c:
Manually merged
Diffstat (limited to 'mysys/hash.c')
-rw-r--r-- | mysys/hash.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index 63aad7d30ed..5443dedf7e0 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -33,7 +33,7 @@ typedef struct st_hash_info { uchar *data; /* data for current entry */ } HASH_LINK; -static uint my_hash_mask(uint hashnr, uint buffmax, uint maxlength); +static uint my_hash_mask(size_t hashnr, size_t buffmax, size_t maxlength); static void movelink(HASH_LINK *array,uint pos,uint next_link,uint newlink); static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length); @@ -157,14 +157,14 @@ my_hash_key(const HASH *hash, const uchar *record, size_t *length, /* Calculate pos according to keys */ -static uint my_hash_mask(uint hashnr, uint buffmax, uint maxlength) +static uint my_hash_mask(size_t hashnr, size_t buffmax, size_t maxlength) { if ((hashnr & (buffmax-1)) < maxlength) return (hashnr & (buffmax-1)); return (hashnr & ((buffmax >> 1) -1)); } static uint my_hash_rec_mask(const HASH *hash, HASH_LINK *pos, - uint buffmax, uint maxlength) + size_t buffmax, size_t maxlength) { size_t length; uchar *key= (uchar*) my_hash_key(hash, pos->data, &length, 0); @@ -315,8 +315,7 @@ static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, my_bool my_hash_insert(HASH *info, const uchar *record) { int flag; - size_t idx; - uint halfbuff,hash_nr,first_index; + size_t idx,halfbuff,hash_nr,first_index; uchar *ptr_to_rec,*ptr_to_rec2; HASH_LINK *data,*empty,*gpos,*gpos2,*pos; @@ -556,8 +555,8 @@ exit: my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, size_t old_key_length) { - uint new_index,new_pos_index,blength,records,empty; - size_t idx; + uint new_index,new_pos_index,blength,records; + size_t idx,empty; HASH_LINK org_link,*data,*previous,*pos; DBUG_ENTER("my_hash_update"); |