~drizzle-trunk/drizzle/development

641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
1
/*****************************************************************************
2
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
4
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
16
17
*****************************************************************************/
18
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
19
/*
20
 * Start of xa.h header
21
 *
22
 * Define a symbol to prevent multiple inclusions of this header file
23
 */
24
#ifndef	XA_H
25
#define	XA_H
26
27
/*
28
 * Transaction branch identification: XID and NULLXID:
29
 */
30
#ifndef XIDDATASIZE
31
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
32
/** Sizes of transaction identifier */
33
#define	XIDDATASIZE	128		/*!< maximum size of a transaction
34
					identifier, in bytes */
35
#define	MAXGTRIDSIZE	 64		/*!< maximum size in bytes of gtrid */
36
#define	MAXBQUALSIZE	 64		/*!< maximum size in bytes of bqual */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
37
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
38
/** X/Open XA distributed transaction identifier */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
39
struct xid_t {
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
40
	long formatID;			/*!< format identifier; -1
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
41
					means that the XID is null */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
42
	long gtrid_length;		/*!< value from 1 through 64 */
43
	long bqual_length;		/*!< value from 1 through 64 */
44
	char data[XIDDATASIZE];		/*!< distributed transaction
45
					identifier */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
46
};
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
47
/** X/Open XA distributed transaction identifier */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
48
typedef	struct xid_t XID;
49
#endif
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
50
/** X/Open XA distributed transaction status codes */
51
/* @{ */
52
#define	XA_OK		0		/*!< normal execution */
53
#define	XAER_ASYNC	-2		/*!< asynchronous operation already
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
54
					outstanding */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
55
#define	XAER_RMERR	-3		/*!< a resource manager error
56
					occurred in the transaction
57
					branch */
58
#define	XAER_NOTA	-4		/*!< the XID is not valid */
59
#define	XAER_INVAL	-5		/*!< invalid arguments were given */
60
#define	XAER_PROTO	-6		/*!< routine invoked in an improper
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
61
					context */
641.2.3 by Monty Taylor
InnoDB Plugin 1.0.4
62
#define	XAER_RMFAIL	-7		/*!< resource manager unavailable */
63
#define	XAER_DUPID	-8		/*!< the XID already exists */
64
#define	XAER_OUTSIDE	-9		/*!< resource manager doing
65
					work outside transaction */
66
/* @} */
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
67
#endif /* ifndef XA_H */
68
/*
69
 * End of xa.h header
70
 */