~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/hash.c

  • Committer: Brian Aker
  • Date: 2008-07-13 18:27:33 UTC
  • Revision ID: brian@tangent.org-20080713182733-3u1et5nrmofi8a8n
my_bool cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  return nr1;
46
46
}
47
47
 
48
 
my_bool
 
48
bool
49
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,
147
147
 
148
148
static inline char*
149
149
hash_key(const HASH *hash, const uchar *record, size_t *length,
150
 
         my_bool first)
 
150
         bool first)
151
151
{
152
152
  if (hash->get_key)
153
153
    return (char*) (*hash->get_key)(record,length,first);
306
306
 
307
307
        /* Write a hash-key to the hash-index */
308
308
 
309
 
my_bool my_hash_insert(HASH *info,const uchar *record)
 
309
bool my_hash_insert(HASH *info,const uchar *record)
310
310
{
311
311
  int flag;
312
312
  size_t idx;
444
444
** if there is a free-function it's called for record if found
445
445
******************************************************************************/
446
446
 
447
 
my_bool hash_delete(HASH *hash,uchar *record)
 
447
bool hash_delete(HASH *hash,uchar *record)
448
448
{
449
449
  uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index;
450
450
  HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
531
531
          This is much more efficent than using a delete & insert.
532
532
          */
533
533
 
534
 
my_bool hash_update(HASH *hash, uchar *record, uchar *old_key,
 
534
bool hash_update(HASH *hash, uchar *record, uchar *old_key,
535
535
                    size_t old_key_length)
536
536
{
537
537
  uint new_index,new_pos_index,blength,records,empty;
653
653
 
654
654
#ifndef DBUG_OFF
655
655
 
656
 
my_bool hash_check(HASH *hash)
 
656
bool hash_check(HASH *hash)
657
657
{
658
658
  int error;
659
659
  uint i,rec_link,found,max_links,seek,links,idx;