~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/hash.cc

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
          {
374
374
            /* Change link of previous LOW-key */
375
375
            gpos->data=ptr_to_rec;
376
 
            gpos->next= (uint) (pos-data);
 
376
            gpos->next= (uint32_t) (pos-data);
377
377
            flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
378
378
          }
379
379
          gpos=pos;
396
396
          {
397
397
            /* Change link of previous hash-key and save */
398
398
            gpos2->data=ptr_to_rec2;
399
 
            gpos2->next=(uint) (pos-data);
 
399
            gpos2->next=(uint32_t) (pos-data);
400
400
            flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
401
401
          }
402
402
          gpos2=pos;
434
434
    if (pos == gpos)
435
435
    {
436
436
      pos->data=(unsigned char*) record;
437
 
      pos->next=(uint) (empty - data);
 
437
      pos->next=(uint32_t) (empty - data);
438
438
    }
439
439
    else
440
440
    {
441
441
      pos->data=(unsigned char*) record;
442
442
      pos->next=NO_RECORD;
443
 
      movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
 
443
      movelink(data,(uint32_t) (pos-data),(uint32_t) (gpos-data),(uint32_t) (empty-data));
444
444
    }
445
445
  }
446
446
  if (++info->records == info->blength)
482
482
  lastpos=data+hash->records;
483
483
 
484
484
  /* Remove link to record */
485
 
  empty=pos; empty_index=(uint) (empty-data);
 
485
  empty=pos; empty_index=(uint32_t) (empty-data);
486
486
  if (gpos)
487
487
    /* unlink current ptr */
488
488
    gpos->next=pos->next;
514
514
  {                                     /* pos is on wrong posit */
515
515
    empty[0]=pos[0];                    /* Save it here */
516
516
    pos[0]=lastpos[0];                  /* This should be here */
517
 
    movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index);
 
517
    movelink(data,(uint32_t) (pos-data),(uint32_t) (pos3-data),empty_index);
518
518
    goto exit;
519
519
  }
520
520
  pos2= hash_mask(lastpos_hashnr,blength,hash->records+1);
523
523
    if (pos2 != hash->records)
524
524
    {
525
525
      empty[0]=lastpos[0];
526
 
      movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index);
 
526
      movelink(data,(uint32_t) (lastpos-data),(uint32_t) (pos-data),empty_index);
527
527
      goto exit;
528
528
    }
529
 
    idx= (uint) (pos-data);             /* Link pos->next after lastpos */
 
529
    idx= (uint32_t) (pos-data);         /* Link pos->next after lastpos */
530
530
  }
531
531
  else idx= NO_RECORD;          /* Different positions merge */
532
532