80
83
typedef struct st_sort_field SORT_FIELD;
82
85
typedef List<Item> List_item;
84
typedef struct st_savepoint SAVEPOINT;
85
extern uint32_t savepoint_alloc_size;
86
86
extern KEY_CREATE_INFO default_key_create_info;
88
88
/* Forward declaration for condition pushdown to storage engine */
170
170
ha_rows estimation_rows_to_insert;
172
drizzled::plugin::StorageEngine *engine; /* storage engine of this Cursor */
173
inline drizzled::plugin::StorageEngine *getEngine() const /* table_type for handler */
172
plugin::StorageEngine *engine; /* storage engine of this Cursor */
173
inline plugin::StorageEngine *getEngine() const /* table_type for handler */
237
237
Discrete_interval auto_inc_interval_for_cur_row;
239
Cursor(drizzled::plugin::StorageEngine &engine_arg, TableShare &share_arg);
239
Cursor(plugin::StorageEngine &engine_arg, TableShare &share_arg);
240
240
virtual ~Cursor(void);
241
virtual Cursor *clone(drizzled::memory::Root *mem_root);
241
virtual Cursor *clone(memory::Root *mem_root);
243
243
/* ha_ methods: pubilc wrappers for private virtual API */
678
678
extern const char *binlog_format_names[];
679
679
extern uint32_t total_ha, total_ha_2pc;
681
/* Wrapper functions */
682
#define ha_commit(session) (ha_commit_trans((session), true))
683
#define ha_rollback(session) (ha_rollback_trans((session), true))
685
681
/* basic stuff */
686
682
int ha_init_errors(void);
687
683
int ha_init(void);
688
684
int ha_end(void);
690
/* transactions: interface to plugin::StorageEngine functions */
691
int ha_commit_one_phase(Session *session, bool all);
692
int ha_rollback_trans(Session *session, bool all);
694
/* transactions: these functions never call plugin::StorageEngine functions directly */
695
int ha_commit_trans(Session *session, bool all);
696
int ha_autocommit_or_rollback(Session *session, int error);
697
int ha_enable_transaction(Session *session, bool on);
700
int ha_rollback_to_savepoint(Session *session, SAVEPOINT *sv);
701
int ha_savepoint(Session *session, SAVEPOINT *sv);
702
int ha_release_savepoint(Session *session, SAVEPOINT *sv);
704
/* these are called by storage engines */
705
void trans_register_ha(Session *session, bool all, drizzled::plugin::StorageEngine *engine);
707
686
uint32_t filename_to_tablename(const char *from, char *to, uint32_t to_length);
708
687
bool tablename_to_filename(const char *from, char *to, size_t to_length);
717
696
!((all ? &session->transaction.all : &session->transaction.stmt)->no_2pc))
720
bool mysql_xa_recover(Session *session);
722
699
SORT_FIELD * make_unireg_sortorder(order_st *order, uint32_t *length,
723
700
SORT_FIELD *sortorder);
724
701
int setup_order(Session *session, Item **ref_pointer_array, TableList *tables,
743
720
int *timestamps, int *timestamps_with_niladic);
745
722
bool mysql_create_table(Session *session,
746
drizzled::TableIdentifier &identifier,
723
TableIdentifier &identifier,
747
724
HA_CREATE_INFO *create_info,
748
drizzled::message::Table *table_proto,
725
message::Table *table_proto,
749
726
AlterInfo *alter_info,
750
727
bool tmp_table, uint32_t select_field_count,
751
728
bool is_if_not_exists);
753
730
bool mysql_create_table_no_lock(Session *session,
754
drizzled::TableIdentifier &identifier,
731
TableIdentifier &identifier,
755
732
HA_CREATE_INFO *create_info,
756
drizzled::message::Table *table_proto,
733
message::Table *table_proto,
757
734
AlterInfo *alter_info,
759
736
uint32_t select_field_count,
760
737
bool is_if_not_exists);
762
739
bool mysql_create_like_table(Session* session, TableList* table, TableList* src_table,
763
drizzled::message::Table& create_table_proto,
764
drizzled::plugin::StorageEngine*,
740
message::Table& create_table_proto,
741
plugin::StorageEngine*,
765
742
bool is_if_not_exists,
766
743
bool is_engine_set);
768
bool mysql_rename_table(drizzled::plugin::StorageEngine *base, const char *old_db,
745
bool mysql_rename_table(plugin::StorageEngine *base, const char *old_db,
769
746
const char * old_name, const char *new_db,
770
747
const char * new_name, uint32_t flags);