1
/* Copyright (C) 2003 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; either version 2 of the License, or
6
(at your option) any later version.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
20
#include "SignalData.hpp"
21
#include <GrepError.hpp>
22
#include <NodeBitmask.hpp>
26
/*****************************************************************************
27
* GREP REQ Request a Global Replication (between SS and PS)
28
*****************************************************************************/
36
* Sender(s)/Reciver(s)
42
START = 0, ///< Start Global Replication (all phases)
43
SLOWSTOP = 1, ///< Stop after finishing applying current GCI epoch
44
FASTSTOP = 2, ///< Stop after finishing applying all PS GCI epochs
45
STATUS = 3, ///< Status
46
REMOVE_BUFFERS = 4, ///< Remove buffers from PS and SS
49
START_METALOG = 6, ///< Start Global Replication Logging of Metadata
50
START_METASCAN = 7, ///< Start Global Replication Scanning of Metadata
51
START_DATALOG = 8, ///< Start Global Replication Logging of table data
52
START_DATASCAN = 9, ///< Start Global Replication Scanning of table data
53
START_REQUESTOR = 10, ///< Start Global Replication Requestor
54
START_TRANSFER = 11, ///< Start SS-PS transfer
55
START_APPLY = 12, ///< Start applying GCI epochs in SS
56
START_DELETE = 13, ///< Start deleting buffers at PS/SS REP automatic.
58
STOP_SUBSCR = 14, ///< Remove subscription
59
STOP_METALOG = 15, ///< Stop Global Replication Logging of Metadata
60
STOP_METASCAN = 16, ///< Stop Global Replication Scanning of Metadata
61
STOP_DATALOG = 17, ///< Stop Global Replication Logging of table data
62
STOP_DATASCAN = 18, ///< Stop Global Replication Scanning of table data
63
STOP_REQUESTOR = 19, ///< Stop Global Replication Requestor
64
STOP_TRANSFER = 20, ///< Stop SS-PS transfer
65
STOP_APPLY = 21, ///< Stop applying GCI epochs in SS
66
STOP_DELETE = 22, ///< Stop deleting buffers at PS/SS REP automatically
67
CREATE_SUBSCR = 23, ///< Create subscription ID in SUMA
68
DROP_TABLE = 24, ///< Create subscription ID in SUMA
71
NO_REQUEST = 0xffffffff
74
STATIC_CONST( SignalLength = 2 );
81
/*****************************************************************************
82
* CREATE Between SS and PS (DB and REP nodes)
83
*****************************************************************************/
85
* @class GrepSubCreateReq
88
class GrepSubCreateReq
91
* Sender(s)/Reciver(s)
95
friend bool printGREP_SUB_CREATE_REQ(FILE *,
100
STATIC_CONST( SignalLength = 5 );
101
Uint32 subscriptionId;
102
Uint32 subscriptionKey;
103
Uint32 subscriptionType;
106
SECTION( TABLE_LIST = 0 );
110
* @class GrepSubCreateReq
113
class GrepSubCreateRef
116
* Sender(s)/Reciver(s)
120
friend bool printGREP_SUB_CREATE_REF(FILE *,
125
STATIC_CONST( SignalLength = 6 );
126
Uint32 subscriptionId;
127
Uint32 subscriptionKey;
128
Uint32 subscriptionType;
136
* @class GrepSubCreateConf
139
class GrepSubCreateConf
142
* Sender(s)/Reciver(s)
146
friend bool printGREP_SUB_CREATE_CONF(FILE *,
151
STATIC_CONST( SignalLength = 6 );
152
Uint32 subscriptionId;
153
Uint32 subscriptionKey;
154
Uint32 subscriptionType;
157
Uint32 noOfNodeGroups;
162
/*****************************************************************************
163
* CREATE Internal between PS DB nodes
164
*****************************************************************************/
167
* @class GrepCreateReq
170
class GrepCreateReq {
172
* Sender(s)/Reciver(s)
174
friend class GrepParticipant;
176
friend bool printGREP_CREATE_REQ(FILE *,
181
STATIC_CONST( SignalLength = 8 );
185
Uint32 subscriberData;
186
Uint32 subscriberRef;
187
Uint32 subscriptionId;
188
Uint32 subscriptionKey;
189
Uint32 subscriptionType;
190
SECTION( TABLE_LIST = 0 );
195
* @class GrepCreateRef
198
class GrepCreateRef {
200
* Sender(s)/Reciver(s)
203
friend class GrepParticipant;
205
friend bool printGREP_CREATE_REF(FILE *,
211
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
213
STATIC_CONST( SignalLength = 6 );
220
Uint32 subscriptionId;
221
Uint32 subscriptionKey;
222
Uint32 subscriptionType;
227
* @class GrepCreateConf
230
class GrepCreateConf {
232
* Sender(s)/Reciver(s)
235
friend class GrepParticipant;
237
friend bool printGREP_CREATE_CONF(FILE *,
242
STATIC_CONST( SignalLength = 6 );
246
Uint32 subscriptionId;
247
Uint32 subscriptionKey;
248
Uint32 subscriptionType;
252
/*****************************************************************************
253
* START Between SS and PS (DB and REP nodes)
254
*****************************************************************************/
257
* @class GrepSubStartReq
260
class GrepSubStartReq {
262
* Sender(s)/Reciver(s)
266
friend bool printGREP_SUB_START_REQ(FILE *,
271
STATIC_CONST( SignalLength = 5 );
272
Uint32 subscriptionId;
273
Uint32 subscriptionKey;
280
* @class GrepSubStartRef
283
class GrepSubStartRef {
285
* Sender(s)/Reciver(s)
289
friend bool printGREP_SUB_START_REF(FILE *,
294
STATIC_CONST( SignalLength = 6 );
295
Uint32 subscriptionId;
296
Uint32 subscriptionKey;
306
* @class GrepSubStartConf
309
class GrepSubStartConf {
311
* Sender(s)/Reciver(s)
315
friend bool printGREP_SUB_START_CONF(FILE *,
320
STATIC_CONST( SignalLength = 6 );
322
Uint32 subscriptionId;
323
Uint32 subscriptionKey;
331
/*****************************************************************************
332
* START Internal between PS DB nodes
333
*****************************************************************************/
336
* @class GrepStartReq
341
* Sender(s)/Reciver(s)
343
friend class GrepParticipant;
345
friend bool printGREP_START_REQ(FILE *,
350
STATIC_CONST( SignalLength = 4 );
354
Uint32 subscriptionId;
355
Uint32 subscriptionKey;
360
* @class GrepStartRef
365
* Sender(s)/Reciver(s)
368
friend class GrepParticipant;
370
friend bool printGREP_START_REF(FILE *,
376
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
378
STATIC_CONST( SignalLength = 6 );
382
Uint32 subscriptionId;
383
Uint32 subscriptionKey;
392
* @class GrepStartConf
395
class GrepStartConf {
397
* Sender(s)/Reciver(s)
400
friend class GrepParticipant;
402
friend bool printGREP_START_CONF(FILE *,
407
STATIC_CONST( SignalLength = 7 );
412
Uint32 subscriptionId;
413
Uint32 subscriptionKey;
419
/*****************************************************************************
420
* SCAN (SYNC) Between SS and PS (REP and DB nodes)
421
*****************************************************************************/
424
* @class GrepSubSyncReq
427
class GrepSubSyncReq {
429
* Sender(s)/Reciver(s)
433
friend bool printGREP_SUB_SYNC_REQ(FILE *,
438
STATIC_CONST( SignalLength = 5 );
439
Uint32 subscriptionId;
440
Uint32 subscriptionKey;
448
* @class GrepSubSyncRef
451
class GrepSubSyncRef {
453
* Sender(s)/Reciver(s)
457
friend bool printGREP_SUB_SYNC_REF(FILE *,
462
STATIC_CONST( SignalLength = 6 );
463
Uint32 subscriptionId;
464
Uint32 subscriptionKey;
473
* @class GrepSubSyncConf
476
class GrepSubSyncConf {
478
* Sender(s)/Reciver(s)
482
friend bool printGREP_SUB_SYNC_CONF(FILE *,
487
STATIC_CONST( SignalLength = 7 );
488
Uint32 subscriptionId;
489
Uint32 subscriptionKey;
499
/*****************************************************************************
500
* SCAN (SYNC) Internal between PS DB nodes
501
*****************************************************************************/
509
* Sender(s)/Reciver(s)
511
friend class GrepParticipant;
513
friend bool printGREP_SYNC_REQ(FILE *,
518
STATIC_CONST( SignalLength = 4 );
522
Uint32 subscriptionId;
523
Uint32 subscriptionKey;
533
* Sender(s)/Reciver(s)
536
friend class GrepParticipant;
538
friend bool printGREP_SYNC_REF(FILE *,
544
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
546
STATIC_CONST( SignalLength = 6 );
550
Uint32 subscriptionId;
551
Uint32 subscriptionKey;
560
* @class GrepSyncConf
566
* Sender(s)/Reciver(s)
568
friend class GrepParticipant;
570
friend bool printGREP_SYNC_CONF(FILE *, const Uint32 *, Uint32, Uint16);
573
STATIC_CONST( SignalLength = 8 );
577
Uint32 subscriptionId;
578
Uint32 subscriptionKey;
584
/*****************************************************************************
585
* ABORT - remove subscription
586
*****************************************************************************/
589
* @class GrepSubRemoveReq
590
* @brief Between PS and SS
592
class GrepSubRemoveReq {
594
* Sender(s)/Reciver(s)
598
friend bool printGREP_SUB_REMOVE_REQ(FILE *, const Uint32 *,
601
STATIC_CONST( SignalLength = 4 );
605
Uint32 subscriptionId;
606
Uint32 subscriptionKey;
611
* @class GrepSubRemoveRef
612
* @brief Between PS and SS
614
class GrepSubRemoveRef {
616
* Sender(s)/Reciver(s)
620
friend bool printGREP_SUB_REMOVE_REF(FILE *, const Uint32 *,
623
STATIC_CONST( SignalLength = 5 );
627
Uint32 subscriptionId;
628
Uint32 subscriptionKey;
637
class GrepSubRemoveConf {
639
* Sender(s)/Reciver(s)
643
friend bool printGREP_SUB_REMOVE_CONF(FILE *,
648
STATIC_CONST( SignalLength = 4 );
652
Uint32 subscriptionId;
653
Uint32 subscriptionKey;
661
class GrepRemoveReq {
663
* Sender(s)/Reciver(s)
665
friend class GrepParticipant;
667
friend bool printGREP_REMOVE_REQ(FILE *,
672
STATIC_CONST( SignalLength = 4 );
676
Uint32 subscriptionId;
677
Uint32 subscriptionKey;
685
class GrepRemoveRef {
687
* Sender(s)/Reciver(s)
690
friend class GrepParticipant;
692
friend bool printGREP_REMOVE_REF(FILE *,
698
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
700
STATIC_CONST( SignalLength = 5 );
703
Uint32 subscriptionId;
704
Uint32 subscriptionKey;
716
class GrepRemoveConf {
718
* Sender(s)/Reciver(s)
721
friend class GrepParticipant;
723
friend bool printGREP_REMOVE_CONF(FILE *,
728
STATIC_CONST( SignalLength = 5 );
731
Uint32 subscriptionId;
732
Uint32 subscriptionKey;
737
/*****************************************************************************
739
*****************************************************************************/
742
* @class GrepWaitGcpReq
745
class GrepWaitGcpReq {
747
* Sender(s)/Reciver(s)
750
friend class GrepParticipant;
752
friend bool printGREP_WAITGCP_REQ(FILE *, const Uint32 *,
755
STATIC_CONST( SignalLength = 5 );
759
Uint32 subscriptionId;
760
Uint32 subscriptionKey;
765
* @class GrepWaitGcpConf
768
class GrepWaitGcpConf {
770
* Sender(s)/Reciver(s)
773
friend class GrepParticipant;
775
friend bool printGREP_WAITGCP_CONF(FILE *,
780
STATIC_CONST( SignalLength = 4 );
783
Uint32 subscriptionId;
784
Uint32 subscriptionKey;
790
class GrepCreateSubscriptionIdConf {
793
friend bool printGREP_CREATE_SUBSCRIPTION_ID_CONF(FILE *, const Uint32 *,
796
STATIC_CONST( SignalLength = 3 );
798
Uint32 subscriptionId;
799
Uint32 subscriptionKey;
800
union { // Haven't decide what to call it
802
Uint32 subscriberData;
810
friend bool printGREP_START_ME(FILE *, const Uint32 *,
813
STATIC_CONST( SignalLength = 1 );
821
* @class GrepAddSubReq
824
class GrepAddSubReq {
826
* Sender(s)/Reciver(s)
828
friend class GrepParticipant;
830
friend bool printGREP_ADD_SUB_REQ(FILE *,
835
STATIC_CONST( SignalLength = 7 );
838
Uint32 subscriberData;
839
Uint32 subscriberRef;
840
Uint32 subscriptionId;
841
Uint32 subscriptionKey;
842
Uint32 subscriptionType;
847
* @class GrepAddSubRef
850
class GrepAddSubRef {
852
* Sender(s)/Reciver(s)
855
friend class GrepParticipant;
857
friend bool printGREP_CREATE_REF(FILE *,
862
STATIC_CONST( SignalLength = 5 );
865
Uint32 subscriptionId;
866
Uint32 subscriptionKey;
867
Uint32 subscriptionType;
872
* @class GrepAddSubConf
875
class GrepAddSubConf {
877
* Sender(s)/Reciver(s)
880
friend class GrepParticipant;
882
friend bool printGREP_CREATE_CONF(FILE *,
887
STATIC_CONST( SignalLength = 1 );