~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/archive/ha_archive.cc

  • Committer: Brian Aker
  • Date: 2008-08-15 15:01:59 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080815150159-vpx04493xvokzrkv
First pass in encapsulating table (it is now an object, no longer a structure).

Show diffs side-by-side

added added

removed removed

Lines of Context:
562
562
 
563
563
  stats.auto_increment_value= create_info->auto_increment_value;
564
564
 
565
 
  for (uint key= 0; key < table_arg->s->keys; key++)
 
565
  for (uint key= 0; key < table_arg->sizeKeys(); key++)
566
566
  {
567
567
    KEY *pos= table_arg->key_info+key;
568
568
    KEY_PART_INFO *key_part=     pos->key_part;
693
693
 
694
694
uint32_t ha_archive::max_row_length(const uchar *buf __attribute__((unused)))
695
695
{
696
 
  uint32_t length= (uint32_t)(table->s->reclength + table->s->fields*2);
 
696
  uint32_t length= (uint32_t)(table->getRecordLength() + table->sizeFields()*2);
697
697
  length+= ARCHIVE_ROW_HEADER_SIZE;
698
698
 
699
699
  uint *ptr, *end;
700
 
  for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;
 
700
  for (ptr= table->getBlobField(), end=ptr + table->sizeBlobFields();
701
701
       ptr != end ;
702
702
       ptr++)
703
703
  {
998
998
  }
999
999
 
1000
1000
  /* Copy null bits */
1001
 
  memcpy(record, ptr, table->s->null_bytes);
1002
 
  ptr+= table->s->null_bytes;
 
1001
  memcpy(record, ptr, table->getNullBytes());
 
1002
  ptr+= table->getNullBytes();
1003
1003
  for (Field **field=table->field ; *field ; field++)
1004
1004
  {
1005
1005
    if (!((*field)->is_null()))
1298
1298
 
1299
1299
    VOID(stat(share->data_file_name, &file_stat));
1300
1300
 
1301
 
    stats.mean_rec_length= table->s->reclength + buffer.alloced_length();
 
1301
    stats.mean_rec_length= table->getRecordLength()+ buffer.alloced_length();
1302
1302
    stats.data_file_length= file_stat.st_size;
1303
1303
    stats.create_time= file_stat.st_ctime;
1304
1304
    stats.update_time= file_stat.st_mtime;