~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_unique.cc

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
/* Functions to check if a row is unique */
17
17
 
18
18
#include "myisam_priv.h"
19
 
#include <mystrings/m_ctype.h>
 
19
#include "drizzled/charset_info.h"
20
20
 
21
21
bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, unsigned char *record,
22
22
                        ha_checksum unique_hash, my_off_t disk_pos)
44
44
    if (info->lastpos != disk_pos &&
45
45
        !(*info->s->compare_unique)(info,def,record,info->lastpos))
46
46
    {
47
 
      my_errno=HA_ERR_FOUND_DUPP_UNIQUE;
 
47
      errno=HA_ERR_FOUND_DUPP_UNIQUE;
48
48
      info->errkey= (int) def->key;
49
49
      info->dupp_key_pos= info->lastpos;
50
50
      info->page_changed=1;                     /* Can't optimize read next */