~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to plugin/innobase/include/trx0types.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 1996, 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
 
 
19
/**************************************************//**
 
20
@file include/trx0types.h
 
21
Transaction system global type definitions
 
22
 
 
23
Created 3/26/1996 Heikki Tuuri
 
24
*******************************************************/
 
25
 
 
26
#ifndef trx0types_h
 
27
#define trx0types_h
 
28
 
 
29
#include "ut0byte.h"
 
30
 
 
31
/** prepare trx_t::id for being printed via printf(3) */
 
32
#define TRX_ID_PREP_PRINTF(id)  (ullint) ut_conv_dulint_to_longlong(id)
 
33
 
 
34
/** printf(3) format used for printing TRX_ID_PRINTF_PREP() */
 
35
#define TRX_ID_FMT              "%llX"
 
36
 
 
37
/** maximum length that a formatted trx_t::id could take, not including
 
38
the terminating NUL character. */
 
39
#define TRX_ID_MAX_LEN          17
 
40
 
 
41
/** Memory objects */
 
42
/* @{ */
 
43
/** Transaction */
 
44
typedef struct trx_struct       trx_t;
 
45
/** Transaction system */
 
46
typedef struct trx_sys_struct   trx_sys_t;
 
47
/** Doublewrite information */
 
48
typedef struct trx_doublewrite_struct   trx_doublewrite_t;
 
49
/** Signal */
 
50
typedef struct trx_sig_struct   trx_sig_t;
 
51
/** Rollback segment */
 
52
typedef struct trx_rseg_struct  trx_rseg_t;
 
53
/** Transaction undo log */
 
54
typedef struct trx_undo_struct  trx_undo_t;
 
55
/** Array of undo numbers of undo records being rolled back or purged */
 
56
typedef struct trx_undo_arr_struct trx_undo_arr_t;
 
57
/** A cell of trx_undo_arr_t */
 
58
typedef struct trx_undo_inf_struct trx_undo_inf_t;
 
59
/** The control structure used in the purge operation */
 
60
typedef struct trx_purge_struct trx_purge_t;
 
61
/** Rollback command node in a query graph */
 
62
typedef struct roll_node_struct roll_node_t;
 
63
/** Commit command node in a query graph */
 
64
typedef struct commit_node_struct commit_node_t;
 
65
/** SAVEPOINT command node in a query graph */
 
66
typedef struct trx_named_savept_struct trx_named_savept_t;
 
67
/* @} */
 
68
 
 
69
/** Rollback contexts */
 
70
enum trx_rb_ctx {
 
71
        RB_NONE = 0,    /*!< no rollback */
 
72
        RB_NORMAL,      /*!< normal rollback */
 
73
        RB_RECOVERY     /*!< rolling back an incomplete transaction,
 
74
                        in crash recovery */
 
75
};
 
76
 
 
77
/** Transaction identifier (DB_TRX_ID, DATA_TRX_ID) */
 
78
typedef dulint  trx_id_t;
 
79
/** Rollback pointer (DB_ROLL_PTR, DATA_ROLL_PTR) */
 
80
typedef dulint  roll_ptr_t;
 
81
/** Undo number */
 
82
typedef dulint  undo_no_t;
 
83
 
 
84
/** Transaction savepoint */
 
85
typedef struct trx_savept_struct trx_savept_t;
 
86
/** Transaction savepoint */
 
87
struct trx_savept_struct{
 
88
        undo_no_t       least_undo_no;  /*!< least undo number to undo */
 
89
};
 
90
 
 
91
/** File objects */
 
92
/* @{ */
 
93
/** Transaction system header */
 
94
typedef byte    trx_sysf_t;
 
95
/** Rollback segment header */
 
96
typedef byte    trx_rsegf_t;
 
97
/** Undo segment header */
 
98
typedef byte    trx_usegf_t;
 
99
/** Undo log header */
 
100
typedef byte    trx_ulogf_t;
 
101
/** Undo log page header */
 
102
typedef byte    trx_upagef_t;
 
103
 
 
104
/** Undo log record */
 
105
typedef byte    trx_undo_rec_t;
 
106
/* @} */
 
107
 
 
108
#endif