~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

  • Committer: Brian Aker
  • Date: 2009-08-15 00:59:30 UTC
  • mfrom: (1115.1.7 merge)
  • Revision ID: brian@gaz-20090815005930-q47yenjrq1esiwsz
Merge of Trond + Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
292
292
  int ha_disable_indexes(uint32_t mode);
293
293
  int ha_enable_indexes(uint32_t mode);
294
294
  int ha_discard_or_import_tablespace(bool discard);
295
 
  void ha_prepare_for_alter();
296
295
  void ha_drop_table(const char *name);
297
296
 
298
297
  void adjust_next_insert_id_after_explicit_value(uint64_t nr);
534
533
 
535
534
  virtual void update_create_info(HA_CREATE_INFO *) {}
536
535
  int check_old_types(void);
537
 
  virtual int assign_to_keycache(Session*, HA_CHECK_OPT *)
538
 
  { return HA_ADMIN_NOT_IMPLEMENTED; }
539
536
  /* end of the list of admin commands */
540
537
 
541
538
  virtual int indexes_are_disabled(void) {return 0;}
542
 
  virtual char *update_table_comment(const char * comment)
543
 
  { return (char*) comment;}
544
539
  virtual void append_create_info(String *)
545
540
  {}
546
541
  /**
553
548
    @retval   true            Foreign key defined on table or index
554
549
    @retval   false           No foreign key defined
555
550
  */
556
 
  virtual bool is_fk_defined_on_table_or_index(uint32_t)
557
 
  { return false; }
558
551
  virtual char* get_foreign_key_create_info(void)
559
552
  { return NULL;}  /* gets foreign key create string from InnoDB */
560
553
  /** used in ALTER Table; if changing storage engine is allowed.
565
558
  virtual int get_foreign_key_list(Session *, List<FOREIGN_KEY_INFO> *)
566
559
  { return 0; }
567
560
  virtual uint32_t referenced_by_foreign_key() { return 0;}
568
 
  virtual void init_table_handle_for_HANDLER()
569
 
  { return; }       /* prepare InnoDB for HANDLER */
570
561
  virtual void free_foreign_key_create_info(char *) {}
571
562
  /** The following can be called without an open handler */
572
563
 
738
729
  }
739
730
  virtual void release_auto_increment(void) { return; };
740
731
  /** admin commands - called from mysql_admin_table */
741
 
  virtual int check_for_upgrade(HA_CHECK_OPT *)
742
 
  { return 0; }
743
732
  virtual int check(Session *, HA_CHECK_OPT *)
744
733
  { return HA_ADMIN_NOT_IMPLEMENTED; }
745
734
 
796
785
  { return HA_ERR_WRONG_COMMAND; }
797
786
  virtual int discard_or_import_tablespace(bool)
798
787
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
799
 
  virtual void prepare_for_alter(void) { return; }
800
788
  virtual void drop_table(const char *name);
801
789
};
802
790
 
804
792
extern const char *tx_isolation_names[];
805
793
extern const char *binlog_format_names[];
806
794
extern TYPELIB tx_isolation_typelib;
807
 
extern TYPELIB myisam_stats_method_typelib;
808
795
extern uint32_t total_ha, total_ha_2pc;
809
796
 
810
797
       /* Wrapper functions */
863
850
bool tablename_to_filename(const char *from, char *to, size_t to_length);
864
851
 
865
852
 
866
 
bool mysql_ha_open(Session *session, TableList *tables, bool reopen);
867
 
bool mysql_ha_close(Session *session, TableList *tables);
868
 
bool mysql_ha_read(Session *, TableList *,enum enum_ha_read_modes,char *,
869
 
                   List<Item> *,enum ha_rkey_function,Item *,ha_rows,ha_rows);
870
 
void mysql_ha_flush(Session *session);
871
 
void mysql_ha_rm_tables(Session *session, TableList *tables, bool is_locked);
872
 
void mysql_ha_cleanup(Session *session);
873
 
 
874
853
/*
875
854
  Storage engine has to assume the transaction will end up with 2pc if
876
855
   - there is more than one 2pc-capable storage engine available