~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

  • Committer: Brian Aker
  • Date: 2009-06-05 18:49:23 UTC
  • mfrom: (1039.3.19 handler-cleanup)
  • Revision ID: brian@gaz-20090605184923-36mbxlsxkocuco1w
Merge Stewart, fix LOCK (it was dead, only for dead RENAME SCHEMA code), and
fixed Sun Studio failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
  int ha_enable_indexes(uint32_t mode);
300
300
  int ha_discard_or_import_tablespace(bool discard);
301
301
  void ha_prepare_for_alter();
302
 
  int ha_rename_table(const char *from, const char *to);
303
 
  int ha_delete_table(const char *name);
304
302
  void ha_drop_table(const char *name);
305
303
 
306
 
  int ha_create(const char *name, Table *form, HA_CREATE_INFO *info);
307
 
 
308
304
  void adjust_next_insert_id_after_explicit_value(uint64_t nr);
309
305
  int update_auto_increment();
310
306
  void print_keydup_error(uint32_t key_nr, const char *msg);
580
576
  virtual void free_foreign_key_create_info(char *) {}
581
577
  /** The following can be called without an open handler */
582
578
 
583
 
  /**
584
 
    If frm_error() is called then we will use this to find out what file
585
 
    extentions exist for the storage engine. This is also used by the default
586
 
    rename_table and delete_table method in handler.cc.
587
 
 
588
 
    For engines that have two file name extentions (separate meta/index file
589
 
    and data file), the order of elements is relevant. First element of engine
590
 
    file name extentions array should be meta/index file extention. Second
591
 
    element - data file extention. This order is assumed by
592
 
    prepare_for_repair() when REPAIR Table ... USE_FRM is issued.
593
 
  */
594
 
  virtual const char **bas_ext() const =0;
595
 
 
596
579
  virtual uint32_t index_flags(uint32_t idx, uint32_t part, bool all_parts) const =0;
597
580
 
598
581
  virtual int add_index(Table *, KEY *, uint32_t)
726
709
  void **ha_data(Session *) const;
727
710
  Session *ha_session(void) const;
728
711
 
729
 
  /**
730
 
    Default rename_table() and delete_table() rename/delete files with a
731
 
    given name and extensions from bas_ext().
732
 
 
733
 
    These methods can be overridden, but their default implementation
734
 
    provide useful functionality.
735
 
  */
736
 
  virtual int rename_table(const char *from, const char *to);
737
 
  /**
738
 
    Delete a table in the engine. Called for base as well as temporary
739
 
    tables.
740
 
  */
741
 
  virtual int delete_table(const char *name);
742
 
 
743
712
private:
744
713
  /* Private helpers */
745
714
  inline void mark_trx_read_write();
881
850
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
882
851
  virtual void prepare_for_alter(void) { return; }
883
852
  virtual void drop_table(const char *name);
884
 
  virtual int create(const char *, Table *, HA_CREATE_INFO *)=0;
885
853
};
886
854
 
887
855
 
1003
971
int ha_commit_or_rollback_by_xid(XID *xid, bool commit);
1004
972
int ha_commit_one_phase(Session *session, bool all);
1005
973
int ha_rollback_trans(Session *session, bool all);
1006
 
int ha_prepare(Session *session);
1007
974
int ha_recover(HASH *commit_list);
1008
975
 
1009
976
/* transactions: these functions never call StorageEngine functions directly */