summaryrefslogtreecommitdiff
path: root/sql/ha_federated.h
diff options
context:
space:
mode:
authorunknown <eric@mysql.com>2005-11-09 05:53:34 -0800
committerunknown <eric@mysql.com>2005-11-09 05:53:34 -0800
commitb582ea2bd4c5e901b41f6506cc94cec5a1a33cb6 (patch)
treecfdc61297fd32ac74638cc54d6214b10bee70628 /sql/ha_federated.h
parentc4239fee2178566283c28e098909774f429489cb (diff)
downloadmariadb-git-b582ea2bd4c5e901b41f6506cc94cec5a1a33cb6.tar.gz
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''
Diffstat (limited to 'sql/ha_federated.h')
-rw-r--r--sql/ha_federated.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/ha_federated.h b/sql/ha_federated.h
index 52f4fad9a27..4cca27b3900 100644
--- a/sql/ha_federated.h
+++ b/sql/ha_federated.h
@@ -174,12 +174,14 @@ 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);
+