~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/DictObjOp.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef DICT_OBJ_OP_HPP
 
17
#define DICT_OBJ_OP_HPP
 
18
 
 
19
struct DictObjOp {
 
20
  
 
21
  enum RequestType {
 
22
    Prepare = 0, // Prepare create obj
 
23
    Commit = 1,  // Commit create obj
 
24
    Abort = 2    // Prepare failed, drop instead
 
25
  };
 
26
  
 
27
  enum State {
 
28
    Defined = 0,
 
29
    Preparing = 1,
 
30
    Prepared = 2,
 
31
    Committing = 3,
 
32
    Committed = 4,
 
33
    Aborting = 5,
 
34
    Aborted = 6
 
35
  };
 
36
};
 
37
 
 
38
struct DictCommitReq
 
39
{
 
40
  Uint32 senderData;
 
41
  Uint32 senderRef;
 
42
  Uint32 op_key;
 
43
 
 
44
  STATIC_CONST( SignalLength = 3 );
 
45
  STATIC_CONST( GSN = GSN_DICT_COMMIT_REQ );
 
46
};
 
47
 
 
48
struct DictCommitRef
 
49
{
 
50
  Uint32 senderData;
 
51
  Uint32 senderRef;
 
52
  Uint32 errorCode;
 
53
  enum ErrorCode 
 
54
  {
 
55
    NF_FakeErrorREF = 1
 
56
  };
 
57
  STATIC_CONST( SignalLength = 3 );
 
58
  STATIC_CONST( GSN = GSN_DICT_COMMIT_REF );
 
59
};
 
60
 
 
61
struct DictCommitConf
 
62
{
 
63
  Uint32 senderData;
 
64
  Uint32 senderRef;
 
65
 
 
66
  STATIC_CONST( SignalLength = 2 );
 
67
  STATIC_CONST( GSN = GSN_DICT_COMMIT_CONF );
 
68
};
 
69
 
 
70
struct DictAbortReq
 
71
{
 
72
  Uint32 senderData;
 
73
  Uint32 senderRef;
 
74
  Uint32 op_key;
 
75
 
 
76
  STATIC_CONST( SignalLength = 3 );
 
77
  STATIC_CONST( GSN = GSN_DICT_ABORT_REQ );
 
78
};
 
79
 
 
80
struct DictAbortRef
 
81
{
 
82
  Uint32 senderData;
 
83
  Uint32 senderRef;
 
84
  Uint32 errorCode;
 
85
  enum ErrorCode 
 
86
  {
 
87
    NF_FakeErrorREF = 1
 
88
  };
 
89
  STATIC_CONST( SignalLength = 3 );
 
90
  STATIC_CONST( GSN = GSN_DICT_ABORT_REF );
 
91
};
 
92
 
 
93
struct DictAbortConf
 
94
{
 
95
  Uint32 senderData;
 
96
  Uint32 senderRef;
 
97
 
 
98
  STATIC_CONST( SignalLength = 2 );
 
99
  STATIC_CONST( GSN = GSN_DICT_ABORT_CONF );
 
100
};
 
101
 
 
102
 
 
103
#endif