~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2010-08-01 07:57:39 UTC
  • mfrom: (1672.3.7 rollup)
  • Revision ID: brian@gaz-20100801075739-q42e9czjvni5uhu7
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
      field->setReadSet();
209
209
      from_key+= HA_KEY_BLOB_LENGTH;
210
210
      key_length-= HA_KEY_BLOB_LENGTH;
211
 
      field->set_ptr_offset(to_record - field->getTable()->record[0],
 
211
      field->set_ptr_offset(to_record - field->getTable()->getInsertRecord(),
212
212
                            (ulong) blob_length, from_key);
213
213
      length= key_part->length;
214
214
    }
215
215
    else if (key_part->key_part_flag & HA_VAR_LENGTH_PART)
216
216
    {
217
217
      Field *field= key_part->field;
218
 
      ptrdiff_t ptrdiff= to_record - field->getTable()->record[0];
 
218
      ptrdiff_t ptrdiff= to_record - field->getTable()->getInsertRecord();
219
219
 
220
220
      field->setReadSet();
221
221
      field->setWriteSet();
274
274
 
275
275
    if (key_part->null_bit)
276
276
    {
277
 
      if (*key != test(table->record[0][key_part->null_offset] &
 
277
      if (*key != test(table->getInsertRecord()[key_part->null_offset] &
278
278
                       key_part->null_bit))
279
279
        return 1;
280
280
      if (*key)
294
294
    {
295
295
      const CHARSET_INFO * const cs= key_part->field->charset();
296
296
      uint32_t char_length= key_part->length / cs->mbmaxlen;
297
 
      const unsigned char *pos= table->record[0] + key_part->offset;
 
297
      const unsigned char *pos= table->getInsertRecord() + key_part->offset;
298
298
      if (length > char_length)
299
299
      {
300
300
        char_length= my_charpos(cs, pos, pos + length, char_length);
306
306
        return 1;
307
307
      continue;
308
308
    }
309
 
    if (memcmp(key,table->record[0]+key_part->offset,length))
 
309
    if (memcmp(key,table->getInsertRecord()+key_part->offset,length))
310
310
      return 1;
311
311
  }
312
312
  return 0;
342
342
      to->append('-');
343
343
    if (key_part->null_bit)
344
344
    {
345
 
      if (table->record[0][key_part->null_offset] & key_part->null_bit)
 
345
      if (table->getInsertRecord()[key_part->null_offset] & key_part->null_bit)
346
346
      {
347
347
        to->append(STRING_WITH_LEN("NULL"));
348
348
        continue;
423
423
  Compare key in row to a given key.
424
424
 
425
425
  @param key_part               Key part handler
426
 
  @param key                    Key to compare to value in table->record[0]
 
426
  @param key                    Key to compare to value in table->getInsertRecord()
427
427
  @param key_length             length of 'key'
428
428
 
429
429
  @return