~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 05:59:19 UTC
  • mfrom: (1089.1.9 merge)
  • Revision ID: brian@gaz-20090711055919-m4px3crrdgta5lie
Collection of patches from new-cleanup (includes asserts for field in debug)

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
        restore the part of a record.
197
197
        Maybe this branch is to be removed, but now we
198
198
        have to ignore GCov compaining.
 
199
 
 
200
        This may make more sense once we push down block lengths to the engine (aka partial retrieval).
199
201
      */
200
202
      uint32_t blob_length= uint2korr(from_key);
201
203
      Field_blob *field= (Field_blob*) key_part->field;
 
204
 
 
205
      field->setReadSet();
202
206
      from_key+= HA_KEY_BLOB_LENGTH;
203
207
      key_length-= HA_KEY_BLOB_LENGTH;
204
208
      field->set_ptr_offset(to_record - field->table->record[0],
209
213
    {
210
214
      Field *field= key_part->field;
211
215
      my_ptrdiff_t ptrdiff= to_record - field->table->record[0];
 
216
 
 
217
      field->setReadSet();
 
218
      field->setWriteSet();
212
219
      field->move_field_offset(ptrdiff);
213
220
      key_length-= HA_KEY_BLOB_LENGTH;
214
221
      length= min(key_length, key_part->length);
339
346
        continue;
340
347
      }
341
348
    }
342
 
    if ((field=key_part->field))
 
349
    if ((field= key_part->field))
343
350
    {
344
351
      const CHARSET_INFO * const cs= field->charset();
 
352
      field->setReadSet();
345
353
      field->val_str(&tmp);
346
354
      if (cs->mbmaxlen > 1 &&
347
355
          table->field[key_part->fieldnr - 1]->field_length !=
368
376
    else
369
377
      to->append(STRING_WITH_LEN("???"));
370
378
  }
371
 
 
372
 
  return;
373
379
}
374
380
 
375
381