MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LCP.hpp
1 /*
2  Copyright (C) 2003, 2005, 2006, 2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
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 LCP_SIGNAL_DATA_HPP
20 #define LCP_SIGNAL_DATA_HPP
21 
22 #include "SignalData.hpp"
23 #include <NodeBitmask.hpp>
24 
25 struct StartLcpReq {
29  friend class Dbdih;
30 
38  friend class Dblqh;
39 
40  friend bool printSTART_LCP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
41 public:
42 
43  STATIC_CONST( SignalLength = 2 + 2 * NdbNodeBitmask::Size );
44  Uint32 senderRef;
45  Uint32 lcpId;
46 
47  NdbNodeBitmask participatingDIH;
48  NdbNodeBitmask participatingLQH;
49 };
50 
51 class StartLcpConf {
55  friend class Dblqh;
56 
64  friend class Dbdih;
65 
66  friend bool printSTART_LCP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
67 public:
68 
69  STATIC_CONST( SignalLength = 2 );
70 private:
71  Uint32 senderRef;
72  Uint32 lcpId;
73 };
74 
80 class LcpFragOrd {
84  friend class Dbdih;
85  friend class Lgman;
86  friend class Pgman;
87  friend class Dbtup;
88 
96  friend class Dblqh;
97  friend class DblqhProxy;
98  friend class PgmanProxy;
99 
100  friend bool printLCP_FRAG_ORD(FILE *, const Uint32 *, Uint32, Uint16);
101 public:
102  STATIC_CONST( SignalLength = 6 );
103 private:
104 
105  Uint32 tableId;
106  Uint32 fragmentId;
107  Uint32 lcpNo;
108  Uint32 lcpId;
109  Uint32 lastFragmentFlag;
110  Uint32 keepGci;
111 };
112 
113 
114 struct LcpFragRep {
118  friend class Dbdih;
119 
123  friend class Dblqh;
124  friend class DblqhProxy;
125 
126  friend bool printLCP_FRAG_REP(FILE *, const Uint32 *, Uint32, Uint16);
127 
128  STATIC_CONST( SignalLength = 7 );
129  STATIC_CONST( BROADCAST_REQ = 0 );
130 
131  Uint32 nodeId;
132  Uint32 lcpId;
133  Uint32 lcpNo;
134  Uint32 tableId;
135  Uint32 fragId;
136  Uint32 maxGciCompleted;
137  Uint32 maxGciStarted;
138 };
139 
144  friend class Dbdih;
145 
149  friend class Dblqh;
150  friend class DblqhProxy;
151 
152  friend bool printLCP_COMPLETE_REP(FILE *, const Uint32 *, Uint32, Uint16);
153 public:
154  STATIC_CONST( SignalLength = 3 );
155 
156 private:
157  Uint32 nodeId;
158  Uint32 blockNo;
159  Uint32 lcpId;
160 };
161 
163 {
164  Uint32 senderData;
165  Uint32 senderRef;
166  Uint32 lcpNo;
167  Uint32 tableId;
168  Uint32 fragmentId;
169  Uint32 lcpId;
170  Uint32 backupPtr;
171  Uint32 backupId;
172 
173  STATIC_CONST( SignalLength = 8 );
174 };
175 
177 {
178  Uint32 senderData;
179  Uint32 senderRef;
180  Uint32 tableId;
181  Uint32 fragmentId;
182  Uint32 errorCode;
183 
184  STATIC_CONST( SignalLength = 5 );
185 };
186 
188 {
189  Uint32 senderData;
190  Uint32 senderRef;
191  Uint32 tableId;
192  Uint32 fragmentId;
193 
194  STATIC_CONST( SignalLength = 4 );
195 };
196 
197 struct EndLcpReq
198 {
199  Uint32 senderData;
200  Uint32 senderRef;
201  Uint32 backupPtr;
202  Uint32 backupId;
203  // extra word for LQH worker to proxy
204  Uint32 proxyBlockNo;
205 
206  STATIC_CONST( SignalLength = 4 );
207 };
208 
209 struct EndLcpRef
210 {
211  Uint32 senderData;
212  Uint32 senderRef;
213  Uint32 errorCode;
214 
215  STATIC_CONST( SignalLength = 3 );
216 };
217 
219 {
220  Uint32 senderData;
221  Uint32 senderRef;
222 
223  STATIC_CONST( SignalLength = 2 );
224 };
225 
226 #endif