summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-03-13 21:58:09 +0100
committerserg@serg.mylan <>2005-03-13 21:58:09 +0100
commit8986ffebde7495d97bf2476521cf1338b6b1670d (patch)
treeb8781cf585dcf44abc4918c5d44feee0747ad2f8 /sql/handler.h
parent0c31836fa574cc8ca4897049f6701b773271b0d1 (diff)
downloadmariadb-git-8986ffebde7495d97bf2476521cf1338b6b1670d.tar.gz
print xa recovery progress
add names to handlertons trans_need_2pc() macro
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h
index d4e24bbb411..c8e1d75f2f7 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -273,6 +273,10 @@ typedef struct xid_t XID;
typedef struct
{
/*
+ storage engine name as it should be printed to a user
+ */
+ const char *name;
+ /*
each storage engine has it's own memory area (actually a pointer)
in the thd, for storing per-connection information.
It is accessed as
@@ -832,10 +836,20 @@ int ha_recover(HASH *commit_list);
int ha_commit_trans(THD *thd, bool all);
int ha_autocommit_or_rollback(THD *thd, int error);
int ha_enable_transaction(THD *thd, bool on);
-void trans_register_ha(THD *thd, bool all, handlerton *ht);
/* savepoints */
int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv);
int ha_savepoint(THD *thd, SAVEPOINT *sv);
int ha_release_savepoint(THD *thd, SAVEPOINT *sv);
+/* these are called by storage engines */
+void trans_register_ha(THD *thd, bool all, handlerton *ht);
+
+/*
+ Storage engine has to assume the transaction will end up with 2pc if
+ - there is more than one 2pc-capable storage engine available
+ - in the current transaction 2pc was not disabled yet
+*/
+#define trans_need_2pc(thd, all) ((total_ha_2pc > 1) && \
+ !((all ? &thd->transaction.all : &thd->transaction.stmt)->no_2pc))
+