~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/hash.c

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
static uint calc_hash(const HASH *hash, const uchar *key, size_t length)
42
42
{
43
 
  uint32_t nr1=1, nr2=4;
44
 
  hash->charset->coll->hash_sort(hash->charset,(const uchar*) key,length,&nr1,&nr2);
 
43
  ulong nr1=1, nr2=4;
 
44
  hash->charset->coll->hash_sort(hash->charset,(uchar*) key,length,&nr1,&nr2);
45
45
  return nr1;
46
46
}
47
47
 
48
48
bool
49
 
_hash_init(HASH *hash,uint growth_size, const CHARSET_INFO * const charset,
 
49
_hash_init(HASH *hash,uint growth_size, CHARSET_INFO *charset,
50
50
           ulong size, size_t key_offset, size_t key_length,
51
51
           hash_get_key get_key,
52
52
           void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
288
288
  size_t rec_keylength;
289
289
  uchar *rec_key= (uchar*) hash_key(hash,pos->data,&rec_keylength,1);
290
290
  return ((length && length != rec_keylength) ||
291
 
          my_strnncoll(hash->charset, (const uchar*) rec_key, rec_keylength,
292
 
                       (const uchar*) key, rec_keylength));
 
291
          my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength,
 
292
                       (uchar*) key, rec_keylength));
293
293
}
294
294
 
295
295