mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / kernel / signaldata / RepImpl.hpp
blob510fed8e3acdbe6bf747f4f4a226ee6bc5d37f9c
1 /* Copyright (c) 2003-2005 MySQL AB
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef REP_IMPL_HPP
17 #define REP_IMPL_HPP
19 #include "SignalData.hpp"
20 #include <NodeBitmask.hpp>
21 #include <ndb_limits.h>
22 #include <debugger/GrepError.hpp>
24 /**
25 * RecordType
26 * sz = no of elems in enum
27 * @todo support for meta_log must be added
29 enum RecordType
31 DATA_SCAN = 0,
32 DATA_LOG = 1,
33 META_SCAN = 2,
34 // META_LOG = 3, //removed META_LOG. not supported
35 RecordTypeSize = 3 // =4 if meta log is supported
38 /**
39 * Wait GCP
41 class RepWaitGcpReq
43 /**
44 * Sender(s)/Reciver(s)
46 friend class Rep;
47 friend class GrepParticipant;
48 friend bool printREP_WAITGCP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
50 public:
51 STATIC_CONST( SignalLength = 5 );
52 Uint32 senderData;
53 Uint32 subscriptionId;
54 Uint32 subscriptionKey;
55 Uint32 gcp;
56 Uint32 senderNodeId;
59 class RepWaitGcpConf
61 /**
62 * Sender(s)/Reciver(s)
64 friend class Rep;
65 friend class GrepParticipant;
67 friend bool printREP_WAITGCP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
69 public:
70 STATIC_CONST( SignalLength = 5 );
71 Uint32 senderData;
72 Uint32 senderRef;
73 Uint32 subscriptionId;
74 Uint32 subscriptionKey;
75 Uint32 senderNodeId;
78 class RepWaitGcpRef
80 /**
81 * Sender(s)/Reciver(s)
83 friend class Rep;
84 friend class GrepParticipant;
86 friend bool printREP_WAITGCP_REF(FILE *, const Uint32 *, Uint32, Uint16);
88 public:
89 STATIC_CONST( SignalLength = 6 );
90 Uint32 senderData;
91 Uint32 senderRef;
92 Uint32 subscriptionId;
93 Uint32 subscriptionKey;
94 Uint32 senderNodeId;
95 GrepError::GE_Code err;
98 class RepGetGciReq
101 * Sender(s)/Reciver(s)
103 friend class Rep;
104 friend class Grep;
106 friend bool printREP_GET_GCI_REQ(FILE *, const Uint32 *, Uint32, Uint16);
108 public:
109 STATIC_CONST( SignalLength = 3 );
110 Uint32 senderData;
111 Uint32 senderRef;
112 Uint32 nodeGrp;
115 class RepGetGciConf
118 * Sender(s)/Reciver(s)
120 friend class Rep;
122 friend bool printREP_GET_GCI_CONF(FILE *, const Uint32 *, Uint32, Uint16);
124 public:
125 STATIC_CONST( SignalLength = 7 );
126 Uint32 senderData;
127 Uint32 senderRef;
128 Uint32 nodeGrp;
129 Uint32 firstPSGCI;
130 Uint32 lastPSGCI;
131 Uint32 firstSSGCI;
132 Uint32 lastSSGCI;
135 class RepGetGciRef
138 * Sender(s)/Reciver(s)
140 friend class Rep;
142 friend bool printREP_GET_GCI_REF(FILE *, const Uint32 *, Uint32, Uint16);
144 public:
145 STATIC_CONST( SignalLength = 8);
146 Uint32 senderData;
147 Uint32 senderRef;
148 Uint32 nodeGrp;
149 Uint32 firstPSGCI;
150 Uint32 lastPSGCI;
151 Uint32 firstSSGCI;
152 Uint32 lastSSGCI;
153 GrepError::GE_Code err;
156 class RepGetGciBufferReq {
158 * Sender(s)/Reciver(s)
160 friend class Rep;
162 friend bool printREP_GET_GCIBUFFER_REQ(FILE *, const Uint32 *,
163 Uint32, Uint16);
164 public:
165 STATIC_CONST( SignalLength = 5 );
166 Uint32 senderRef;
167 Uint32 senderData;
168 Uint32 firstGCI;
169 Uint32 lastGCI;
170 Uint32 nodeGrp;
174 class RepGetGciBufferConf {
176 * Sender(s)/Reciver(s)
178 friend class Rep;
180 friend bool printREP_GET_GCIBUFFER_CONF(FILE *, const Uint32 *,
181 Uint32, Uint16);
183 public:
184 STATIC_CONST( SignalLength = 8 );
185 Uint32 senderData;
186 Uint32 senderRef;
187 Uint32 firstPSGCI;
188 Uint32 lastPSGCI;
189 Uint32 firstSSGCI;
190 Uint32 lastSSGCI;
191 Uint32 currentGCIBuffer;
192 Uint32 nodeGrp;
195 class RepGetGciBufferRef
198 * Sender(s)/Reciver(s)
200 friend class Rep;
202 friend bool printREP_GET_GCIBUFFER_REF(FILE *, const Uint32 *,
203 Uint32, Uint16);
205 public:
206 STATIC_CONST( SignalLength = 9 );
207 Uint32 senderData;
208 Uint32 senderRef;
209 Uint32 firstPSGCI;
210 Uint32 lastPSGCI;
211 Uint32 firstSSGCI;
212 Uint32 lastSSGCI;
213 Uint32 currentGCIBuffer;
214 Uint32 nodeGrp;
215 GrepError::GE_Code err;
218 class RepInsertGciBufferReq
221 * Sender(s)/Reciver(s)
223 friend class Rep;
225 friend bool printREP_INSERT_GCIBUFFER_REQ(FILE *, const Uint32 *,
226 Uint32, Uint16);
228 public:
229 STATIC_CONST( SignalLength = 5 );
230 Uint32 senderData;
231 Uint32 senderRef;
232 Uint32 gci;
233 Uint32 nodeGrp;
234 Uint32 force;
237 class RepInsertGciBufferRef
240 * Sender(s)/Reciver(s)
242 friend class Rep;
244 friend bool printREP_INSERT_GCIBUFFER_REF(FILE *, const Uint32 *,
245 Uint32, Uint16);
246 public:
247 STATIC_CONST( SignalLength = 7 );
248 Uint32 senderData;
249 Uint32 senderRef;
250 Uint32 gci;
251 Uint32 nodeGrp;
252 Uint32 tableId;
253 Uint32 force;
254 GrepError::GE_Code err;
257 class RepInsertGciBufferConf
260 * Sender(s)/Reciver(s)
262 friend class Rep;
264 friend bool printREP_INSERT_GCIBUFFER_CONF(FILE *, const Uint32 *,
265 Uint32, Uint16);
266 public:
267 STATIC_CONST( SignalLength = 5 );
268 Uint32 senderData;
269 Uint32 senderRef;
270 Uint32 gci;
271 Uint32 nodeGrp;
272 Uint32 force;
276 class RepClearPSGciBufferReq
279 * Sender(s)/Reciver(s)
281 friend class Rep;
283 friend bool printREP_CLEAR_PS_GCIBUFFER_REQ(FILE *, const Uint32 *,
284 Uint32, Uint16);
285 public:
286 STATIC_CONST( SignalLength = 5 );
287 Uint32 senderData;
288 Uint32 senderRef;
289 Uint32 firstGCI;
290 Uint32 lastGCI;
291 Uint32 nodeGrp;
294 class RepClearPSGciBufferRef
297 * Sender(s)/Reciver(s)
299 friend class Rep;
301 friend bool printREP_CLEAR_PS_GCIBUFFER_REF(FILE *, const Uint32 *,
302 Uint32, Uint16);
304 public:
305 STATIC_CONST( SignalLength = 7 );
306 Uint32 senderData;
307 Uint32 senderRef;
308 Uint32 firstGCI;
309 Uint32 lastGCI;
310 Uint32 currentGCI;
311 Uint32 nodeGrp;
312 GrepError::GE_Code err;
315 class RepClearPSGciBufferConf
318 * Sender(s)/Reciver(s)
320 friend class Rep;
322 friend bool printREP_CLEAR_PS_GCIBUFFER_CONF(FILE *, const Uint32 *,
323 Uint32, Uint16);
324 public:
325 STATIC_CONST( SignalLength = 5 );
326 Uint32 senderData;
327 Uint32 senderRef;
328 Uint32 firstGCI;
329 Uint32 lastGCI;
330 Uint32 nodeGrp;
333 class RepClearSSGciBufferReq
336 * Sender(s)/Reciver(s)
338 friend class Rep;
340 friend bool printREP_CLEAR_SS_GCIBUFFER_REQ(FILE *, const Uint32 *,
341 Uint32, Uint16);
342 public:
343 STATIC_CONST( SignalLength = 5 );
344 Uint32 senderData;
345 Uint32 senderRef;
346 Uint32 firstGCI;
347 Uint32 lastGCI;
348 Uint32 nodeGrp;
351 class RepClearSSGciBufferRef
354 * Sender(s)/Reciver(s)
356 friend class Rep;
358 friend bool printREP_CLEAR_SS_GCIBUFFER_REF(FILE *, const Uint32 *,
359 Uint32, Uint16);
361 public:
362 STATIC_CONST( SignalLength = 7 );
363 Uint32 senderData;
364 Uint32 senderRef;
365 Uint32 firstGCI;
366 Uint32 lastGCI;
367 Uint32 currentGCI;
368 Uint32 nodeGrp;
369 GrepError::GE_Code err;
372 class RepClearSSGciBufferConf
375 * Sender(s)/Reciver(s)
377 friend class Rep;
379 friend bool printREP_CLEAR_SS_GCIBUFFER_CONF(FILE *, const Uint32 *,
380 Uint32, Uint16);
381 public:
382 STATIC_CONST( SignalLength = 5 );
383 Uint32 senderData;
384 Uint32 senderRef;
385 Uint32 firstGCI;
386 Uint32 lastGCI;
387 Uint32 nodeGrp;
391 class RepDataPage
394 * Sender(s)/Reciver(s)
396 friend class Rep;
398 friend bool printREP_DATA_PAGE(FILE *, const Uint32 *, Uint32, Uint16);
400 public:
401 STATIC_CONST( SignalLength = 4 );
402 Uint32 senderData;
403 Uint32 senderRef;
404 Uint32 nodeGrp;
405 Uint32 gci;
409 class RepGciBufferAccRep
412 * Sender(s)/Reciver(s)
414 friend class Rep;
416 friend bool printREP_GCIBUFFER_ACC_REP(FILE *, const Uint32 *,
417 Uint32, Uint16);
418 public:
419 STATIC_CONST( SignalLength = 5 );
420 Uint32 senderData;
421 Uint32 senderRef;
422 Uint32 nodeGrp;
423 Uint32 gci;
424 Uint32 totalSentBytes;
427 class RepDropTableReq
430 * Sender(s)/Reciver(s)
432 friend class Rep;
434 friend bool printREP_DROP_TABLE_REQ(FILE *, const Uint32 *,
435 Uint32, Uint16);
437 public:
438 STATIC_CONST( SignalLength = 4 );
439 Uint32 tableId;
440 // char tableName[MAX_TAB_NAME_SIZE];
443 class RepDropTableRef
446 * Sender(s)/Reciver(s)
448 friend class Rep;
450 friend bool printREP_DROP_TABLE_REF(FILE *, const Uint32 *,
451 Uint32, Uint16);
453 public:
454 STATIC_CONST( SignalLength = 4 );
455 Uint32 tableId;
456 // char tableName[MAX_TAB_NAME_SIZE];
459 class RepDropTableConf
462 * Sender(s)/Reciver(s)
464 friend class Rep;
466 friend bool printREP_DROP_TABLE_CONF(FILE *, const Uint32 *, Uint32, Uint16);
468 public:
469 STATIC_CONST( SignalLength = 4 );
470 Uint32 tableId;
471 //char tableName[MAX_TAB_NAME_SIZE];
474 class RepDisconnectRep
477 * Sender(s)/Reciver(s)
479 friend class Rep;
480 friend class Grep;
482 friend bool printREP_DISCONNECT_REP(FILE *, const Uint32 *, Uint32, Uint16);
484 public:
485 enum NodeType {
486 DB = 0,
487 REP = 1
489 STATIC_CONST( SignalLength = 7 );
490 Uint32 senderData;
491 Uint32 senderRef;
492 Uint32 nodeId;
493 Uint32 nodeType;
494 Uint32 subId;
495 Uint32 subKey;
496 Uint32 err;
499 #endif