~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/blitzdb/ha_blitz.cc

Merged Drizzle's Trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1057
1057
  uint32_t *end = pos + table->sizeBlobFields();
1058
1058
 
1059
1059
  while (pos != end) {
1060
 
    length += 2 + ((Field_blob*)table->field[*pos])->get_length();
 
1060
    length += 2 + ((Field_blob *)table->getField(*pos))->get_length();
1061
1061
    pos++;
1062
1062
  }
1063
1063
 
1235
1235
 
1236
1236
  /* Nothing special to do if the table is fixed length */
1237
1237
  if (share->fixed_length_table) {
1238
 
    memcpy(row_buffer, row_to_pack, table->s->reclength);
1239
 
    return (size_t)table->s->reclength;
 
1238
    memcpy(row_buffer, row_to_pack, table->s->getRecordLength());
 
1239
    return (size_t)table->s->getRecordLength();
1240
1240
  }
1241
1241
 
1242
1242
  /* Copy NULL bits */
1244
1244
  pos = row_buffer + table->s->null_bytes;
1245
1245
 
1246
1246
  /* Pack each field into the buffer */
1247
 
  for (Field **field = table->field; *field; field++) {
 
1247
  for (Field **field = table->getFields(); *field; field++) {
1248
1248
    if (!((*field)->is_null()))
1249
1249
      pos = (*field)->pack(pos, row_to_pack + (*field)->offset(row_to_pack));
1250
1250
  }
1269
1269
  pos += table->s->null_bytes;
1270
1270
 
1271
1271
  /* Unpack all fields in the provided row. */
1272
 
  for (Field **field = table->field; *field; field++) {
 
1272
  for (Field **field = table->getFields(); *field; field++) {
1273
1273
    if (!((*field)->is_null())) {
1274
1274
      pos = (*field)->unpack(to + (*field)->offset(table->record[0]), pos);
1275
1275
    }
1328
1328
  }
1329
1329
 
1330
1330
  /* Prepare Index Structure(s) */
1331
 
  KeyInfo *curr = table->s->key_info;
 
1331
  KeyInfo *curr = &table->s->getKeyInfo(0);
1332
1332
  share_ptr->btrees = new BlitzTree[table->s->keys];
1333
1333
 
1334
1334
  for (uint32_t i = 0; i < table->s->keys; i++, curr++) {