~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_unique.c

Merged build changes from Antony.

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 "myisamdef.h"
19
 
#include <m_ctype.h>
 
19
#include <mystrings/m_ctype.h>
20
20
 
21
21
my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, uchar *record,
22
22
                        ha_checksum unique_hash, my_off_t disk_pos)
54
54
    if (_mi_search_next(info,info->s->keyinfo+def->key, info->lastkey,
55
55
                        MI_UNIQUE_HASH_LENGTH, SEARCH_BIGGER,
56
56
                        info->s->state.key_root[def->key]) ||
57
 
        bcmp((char*) info->lastkey, (char*) key_buff, MI_UNIQUE_HASH_LENGTH))
 
57
        memcmp((char*) info->lastkey, (char*) key_buff, MI_UNIQUE_HASH_LENGTH))
58
58
    {
59
59
      info->page_changed=1;                     /* Can't optimize read next */
60
60
      info->lastpos=lastpos;
109
109
    else if (keyseg->flag & HA_BLOB_PART)
110
110
    {
111
111
      uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos);
112
 
      memcpy_fixed((uchar*) &pos,pos+keyseg->bit_start,sizeof(char*));
 
112
      memcpy((uchar*) &pos,pos+keyseg->bit_start,sizeof(char*));
113
113
      if (!length || length > tmp_length)
114
114
        length=tmp_length;                      /* The whole blob */
115
115
    }
204
204
        set_if_smaller(a_length, keyseg->length);
205
205
        set_if_smaller(b_length, keyseg->length);
206
206
      }
207
 
      memcpy_fixed((uchar*) &pos_a,pos_a+keyseg->bit_start,sizeof(char*));
208
 
      memcpy_fixed((uchar*) &pos_b,pos_b+keyseg->bit_start,sizeof(char*));
 
207
      memcpy((uchar*) &pos_a,pos_a+keyseg->bit_start,sizeof(char*));
 
208
      memcpy((uchar*) &pos_b,pos_b+keyseg->bit_start,sizeof(char*));
209
209
    }
210
210
    if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
211
211
        type == HA_KEYTYPE_VARTEXT2)