~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

This patch does not change any algorithms or code paths, 
it just moves the transaction-related methods in the
drizzled/ha_commands.cc file into a file named
drizzled/transaction_services.cc and creates a singleton
Service class called TransactionServices containing all
the previous ha_xxx methods related specifically to the
XA distributed transaction processing model.

This is a quick stopgap patch in the move towards separating
out the XA Resource Manager API from the Storage Engine API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
678
678
extern const char *binlog_format_names[];
679
679
extern uint32_t total_ha, total_ha_2pc;
680
680
 
681
 
       /* Wrapper functions */
682
 
#define ha_commit(session) (ha_commit_trans((session), true))
683
 
#define ha_rollback(session) (ha_rollback_trans((session), true))
684
 
 
685
681
/* basic stuff */
686
682
int ha_init_errors(void);
687
683
int ha_init(void);
688
684
int ha_end(void);
689
685
 
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);
693
 
 
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);
698
 
 
699
 
/* savepoints */
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);
703
 
 
704
 
/* these are called by storage engines */
705
 
void trans_register_ha(Session *session, bool all, drizzled::plugin::StorageEngine *engine);
706
 
 
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);
709
688
 
717
696
        !((all ? &session->transaction.all : &session->transaction.stmt)->no_2pc))
718
697
 
719
698
 
720
 
bool mysql_xa_recover(Session *session);
721
 
 
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,