~jaypipes/drizzle/item-class-file-reorg

« back to all changes in this revision

Viewing changes to storage/myisam/mi_unique.c

  • Committer: Monty Taylor
  • Date: 2008-07-16 19:10:24 UTC
  • mfrom: (51.1.127 remove-dbug)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: monty@inaugust.com-20080716191024-prjgoh7fbri7rx26
MergedĀ fromĀ remove-dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
  my_off_t lastpos=info->lastpos;
25
25
  MI_KEYDEF *key= &info->s->keyinfo[def->key];
26
26
  uchar *key_buff=info->lastkey2;
27
 
  DBUG_ENTER("mi_check_unique");
28
27
 
29
28
  mi_unique_store(record+key->seg->start, unique_hash);
30
29
  _mi_make_key(info,def->key,key_buff,record,0);
37
36
  {
38
37
    info->page_changed=1;                       /* Can't optimize read next */
39
38
    info->lastpos= lastpos;
40
 
    DBUG_RETURN(0);                             /* No matching rows */
 
39
    return(0);                          /* No matching rows */
41
40
  }
42
41
 
43
42
  for (;;)
50
49
      info->dupp_key_pos= info->lastpos;
51
50
      info->page_changed=1;                     /* Can't optimize read next */
52
51
      info->lastpos=lastpos;
53
 
      DBUG_PRINT("info",("Found duplicate"));
54
 
      DBUG_RETURN(1);                           /* Found identical  */
 
52
      return(1);                                /* Found identical  */
55
53
    }
56
54
    if (_mi_search_next(info,info->s->keyinfo+def->key, info->lastkey,
57
55
                        MI_UNIQUE_HASH_LENGTH, SEARCH_BIGGER,
60
58
    {
61
59
      info->page_changed=1;                     /* Can't optimize read next */
62
60
      info->lastpos=lastpos;
63
 
      DBUG_RETURN(0);                           /* end of tree */
 
61
      return(0);                                /* end of tree */
64
62
    }
65
63
  }
66
64
}