MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GCP.hpp
1 /*
2  Copyright (C) 2003, 2005-2008 MySQL AB
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef GCP_HPP
20 #define GCP_HPP
21 
22 #include "SignalData.hpp"
23 
29 struct GCPPrepare
30 {
31  STATIC_CONST( SignalLength = 3 );
32 
33  Uint32 nodeId;
34  Uint32 gci_hi;
35  Uint32 gci_lo;
36 };
37 
38 struct GCPPrepareConf // Distr. DIH-DIH
39 {
40  STATIC_CONST( SignalLength = 3 );
41 
42  Uint32 nodeId;
43  Uint32 gci_hi;
44  Uint32 gci_lo;
45 };
46 
47 struct GCPCommit // Distr. DIH-DIH
48 {
49  STATIC_CONST( SignalLength = 3 );
50 
51  Uint32 nodeId;
52  Uint32 gci_hi;
53  Uint32 gci_lo;
54 };
55 
56 struct GCPNoMoreTrans // Local DIH/TC
57 {
58  STATIC_CONST( SignalLength = 4 );
59  Uint32 senderRef;
60  Uint32 senderData;
61  Uint32 gci_hi;
62  Uint32 gci_lo;
63 };
64 
65 struct GCPTCFinished // Local TC-DIH
66 {
67  STATIC_CONST( SignalLength = 3 );
68 
69  Uint32 senderData;
70  Uint32 gci_hi;
71  Uint32 gci_lo;
72 };
73 
74 struct GCPNodeFinished // Distr. DIH-DIH
75 {
76  STATIC_CONST( SignalLength = 4 );
77 
78  Uint32 nodeId;
79  Uint32 gci_hi;
80  Uint32 failno;
81  Uint32 gci_lo;
82 };
83 
87 class GCPSaveReq // Distr. DIH-LQH
88 {
92  friend class Dbdih;
93 
97  friend class Dblqh;
98  friend class DblqhProxy;
99 
100  friend bool printGCPSaveReq(FILE * output, const Uint32 * theData,
101  Uint32 len, Uint16 receiverBlockNo);
102 public:
103  STATIC_CONST( SignalLength = 3 );
104 
105 private:
106  Uint32 dihBlockRef;
107  Uint32 dihPtr;
108  Uint32 gci;
109 };
110 
111 class GCPSaveRef // Distr. LQH-DIH
112 {
116  friend class Dblqh;
117  friend class DblqhProxy;
118 
122  friend class Dbdih;
123 
124  friend bool printGCPSaveRef(FILE * output, const Uint32 * theData,
125  Uint32 len, Uint16 receiverBlockNo);
126 public:
127  STATIC_CONST( SignalLength = 4 );
128 
129  enum ErrorCode {
130  NodeShutdownInProgress = 1,
131  FakedSignalDueToNodeFailure = 2,
132  NodeRestartInProgress = 3
133  };
134 
135 private:
136  Uint32 dihPtr;
137  Uint32 nodeId;
138  Uint32 gci;
139  Uint32 errorCode;
140 };
141 
142 class GCPSaveConf // Distr. LQH-DIH
143 {
147  friend class Dblqh;
148  friend class DblqhProxy;
149 
153  friend class Dbdih;
154 
155  friend bool printGCPSaveConf(FILE * output, const Uint32 * theData,
156  Uint32 len, Uint16 receiverBlockNo);
157 public:
158  STATIC_CONST( SignalLength = 3 );
159 
160 private:
161  Uint32 dihPtr;
162  Uint32 nodeId;
163  Uint32 gci;
164 };
165 
166 #endif