~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/ha_heap.cc

  • Committer: Brian Aker
  • Date: 2010-05-15 01:19:45 UTC
  • Revision ID: brian@gaz-20100515011945-uxhf94vi0tzm0vq6
Rename of KEY to KeyInfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
        hp_free(internal_share);
215
215
        pthread_mutex_unlock(&THR_LOCK_heap);
216
216
      }
217
 
      implicit_emptied= 1;
218
217
    }
219
218
  }
220
219
  ref_length= sizeof(HEAP_PTR);
300
299
{
301
300
  for (uint32_t i= 0; i < table->s->keys; i++)
302
301
  {
303
 
    KEY *key=table->key_info+i;
 
302
    KeyInfo *key=table->key_info+i;
304
303
    if (!key->rec_per_key)
305
304
      continue;
306
305
    if (key->algorithm != HA_KEY_ALG_BTREE)
323
322
}
324
323
 
325
324
 
326
 
int ha_heap::write_row(unsigned char * buf)
 
325
int ha_heap::doInsertRecord(unsigned char * buf)
327
326
{
328
327
  int res;
329
328
  ha_statistic_increment(&system_status_var::ha_write_count);
345
344
  return res;
346
345
}
347
346
 
348
 
int ha_heap::update_row(const unsigned char * old_data, unsigned char * new_data)
 
347
int ha_heap::doUpdateRecord(const unsigned char * old_data, unsigned char * new_data)
349
348
{
350
349
  int res;
351
350
  ha_statistic_increment(&system_status_var::ha_update_count);
364
363
  return res;
365
364
}
366
365
 
367
 
int ha_heap::delete_row(const unsigned char * buf)
 
366
int ha_heap::doDeleteRecord(const unsigned char * buf)
368
367
{
369
368
  int res;
370
369
  ha_statistic_increment(&system_status_var::ha_delete_count);
449
448
  return error;
450
449
}
451
450
 
452
 
int ha_heap::rnd_init(bool scan)
 
451
int ha_heap::doStartTableScan(bool scan)
453
452
{
454
453
  return scan ? heap_scan_init(file) : 0;
455
454
}
662
661
ha_rows ha_heap::records_in_range(uint32_t inx, key_range *min_key,
663
662
                                  key_range *max_key)
664
663
{
665
 
  KEY *key=table->key_info+inx;
 
664
  KeyInfo *key=table->key_info+inx;
666
665
  if (key->algorithm == HA_KEY_ALG_BTREE)
667
666
    return hp_rb_records_in_range(file, inx, min_key, max_key);
668
667
 
777
776
  seg= reinterpret_cast<HA_KEYSEG*> (keydef + keys);
778
777
  for (key= 0; key < keys; key++)
779
778
  {
780
 
    KEY *pos= table_arg->key_info+key;
781
 
    KEY_PART_INFO *key_part=     pos->key_part;
782
 
    KEY_PART_INFO *key_part_end= key_part + pos->key_parts;
 
779
    KeyInfo *pos= table_arg->key_info+key;
 
780
    KeyPartInfo *key_part=     pos->key_part;
 
781
    KeyPartInfo *key_part_end= key_part + pos->key_parts;
783
782
 
784
783
    keydef[key].keysegs=   (uint) pos->key_parts;
785
784
    keydef[key].flag=      (pos->flags & (HA_NOSAME | HA_NULL_ARE_EQUAL));