~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

MergedĀ fromĀ me.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
class Field_timestamp;
48
48
class Field_blob;
49
49
 
50
 
extern drizzled::atomic<uint32_t> refresh_version;
 
50
extern uint64_t refresh_version;
51
51
 
52
52
typedef enum enum_table_category TABLE_CATEGORY;
53
53
 
583
583
  void free_io_cache();
584
584
  void filesort_free_buffers(bool full= false);
585
585
  void intern_close_table();
 
586
 
 
587
  void print_error(int error, myf errflag)
 
588
  {
 
589
    s->storage_engine->print_error(error, errflag, *this);
 
590
  }
 
591
 
 
592
  /**
 
593
    @return
 
594
    key if error because of duplicated keys
 
595
  */
 
596
  uint32_t get_dup_key(int error)
 
597
  {
 
598
    cursor->errkey  = (uint32_t) -1;
 
599
    if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOREIGN_DUPLICATE_KEY ||
 
600
        error == HA_ERR_FOUND_DUPP_UNIQUE ||
 
601
        error == HA_ERR_DROP_INDEX_FK)
 
602
      cursor->info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK);
 
603
 
 
604
    return(cursor->errkey);
 
605
  }
586
606
};
587
607
 
588
608
Table *create_virtual_tmp_table(Session *session, List<CreateField> &field_list);