1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Re-applying the work initially done by Brian, and since worked upon by me previously in several separate patches to the 5.1 parent but never pushed.

WL#2952 - add simple single-table only transactions to federated.


sql/ha_federated.cc:
  added handlerton functions for commit and rollback, added handler methods for same.
sql/ha_federated.h:
  added member variable for transaction data (linked list of federated handlers used in transaction) and member functions for support commit and rollback.
mysql-test/r/federated_transactions.result:
  New BitKeeper file ``mysql-test/r/federated_transactions.result''
mysql-test/t/federated_transactions.test:
  New BitKeeper file ``mysql-test/t/federated_transactions.test''
This commit is contained in:
unknown
2005-11-09 05:53:34 -08:00
parent c4239fee21
commit b582ea2bd4
4 changed files with 257 additions and 11 deletions

View File

@@ -174,11 +174,13 @@ private:
public:
ha_federated(TABLE *table_arg);
~ha_federated()
{
}
~ha_federated() {}
/* The name that will be used for display purposes */
const char *table_type() const { return "FEDERATED"; }
/*
Next pointer used in transaction
*/
ha_federated *trx_next;
/*
The name of the index type that will be used for display
don't implement this method unless you really have indexes
@@ -298,7 +300,14 @@ public:
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); //required
virtual bool get_error_message(int error, String *buf);
int external_lock(THD *thd, int lock_type);
int connection_commit();
int connection_rollback();
bool has_transactions() { return 1; }
int connection_autocommit(bool state);
int execute_simple_query(const char *query, int len);
};
bool federated_db_init(void);
int federated_db_end(ha_panic_function type);