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; 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
#include "SignalData.hpp"
20
#include <GrepError.hpp>
21
#include <NodeBitmask.hpp>
25
/*****************************************************************************
26
* GREP REQ Request a Global Replication (between SS and PS)
27
*****************************************************************************/
35
* Sender(s)/Reciver(s)
41
START = 0, ///< Start Global Replication (all phases)
42
SLOWSTOP = 1, ///< Stop after finishing applying current GCI epoch
43
FASTSTOP = 2, ///< Stop after finishing applying all PS GCI epochs
44
STATUS = 3, ///< Status
45
REMOVE_BUFFERS = 4, ///< Remove buffers from PS and SS
48
START_METALOG = 6, ///< Start Global Replication Logging of Metadata
49
START_METASCAN = 7, ///< Start Global Replication Scanning of Metadata
50
START_DATALOG = 8, ///< Start Global Replication Logging of table data
51
START_DATASCAN = 9, ///< Start Global Replication Scanning of table data
52
START_REQUESTOR = 10, ///< Start Global Replication Requestor
53
START_TRANSFER = 11, ///< Start SS-PS transfer
54
START_APPLY = 12, ///< Start applying GCI epochs in SS
55
START_DELETE = 13, ///< Start deleting buffers at PS/SS REP automatic.
57
STOP_SUBSCR = 14, ///< Remove subscription
58
STOP_METALOG = 15, ///< Stop Global Replication Logging of Metadata
59
STOP_METASCAN = 16, ///< Stop Global Replication Scanning of Metadata
60
STOP_DATALOG = 17, ///< Stop Global Replication Logging of table data
61
STOP_DATASCAN = 18, ///< Stop Global Replication Scanning of table data
62
STOP_REQUESTOR = 19, ///< Stop Global Replication Requestor
63
STOP_TRANSFER = 20, ///< Stop SS-PS transfer
64
STOP_APPLY = 21, ///< Stop applying GCI epochs in SS
65
STOP_DELETE = 22, ///< Stop deleting buffers at PS/SS REP automatically
66
CREATE_SUBSCR = 23, ///< Create subscription ID in SUMA
67
DROP_TABLE = 24, ///< Create subscription ID in SUMA
70
NO_REQUEST = 0xffffffff
73
STATIC_CONST( SignalLength = 2 );
80
/*****************************************************************************
81
* CREATE Between SS and PS (DB and REP nodes)
82
*****************************************************************************/
84
* @class GrepSubCreateReq
87
class GrepSubCreateReq
90
* Sender(s)/Reciver(s)
94
friend bool printGREP_SUB_CREATE_REQ(FILE *,
99
STATIC_CONST( SignalLength = 5 );
100
Uint32 subscriptionId;
101
Uint32 subscriptionKey;
102
Uint32 subscriptionType;
105
SECTION( TABLE_LIST = 0 );
109
* @class GrepSubCreateReq
112
class GrepSubCreateRef
115
* Sender(s)/Reciver(s)
119
friend bool printGREP_SUB_CREATE_REF(FILE *,
124
STATIC_CONST( SignalLength = 6 );
125
Uint32 subscriptionId;
126
Uint32 subscriptionKey;
127
Uint32 subscriptionType;
135
* @class GrepSubCreateConf
138
class GrepSubCreateConf
141
* Sender(s)/Reciver(s)
145
friend bool printGREP_SUB_CREATE_CONF(FILE *,
150
STATIC_CONST( SignalLength = 6 );
151
Uint32 subscriptionId;
152
Uint32 subscriptionKey;
153
Uint32 subscriptionType;
156
Uint32 noOfNodeGroups;
161
/*****************************************************************************
162
* CREATE Internal between PS DB nodes
163
*****************************************************************************/
166
* @class GrepCreateReq
169
class GrepCreateReq {
171
* Sender(s)/Reciver(s)
173
friend class GrepParticipant;
175
friend bool printGREP_CREATE_REQ(FILE *,
180
STATIC_CONST( SignalLength = 8 );
184
Uint32 subscriberData;
185
Uint32 subscriberRef;
186
Uint32 subscriptionId;
187
Uint32 subscriptionKey;
188
Uint32 subscriptionType;
189
SECTION( TABLE_LIST = 0 );
194
* @class GrepCreateRef
197
class GrepCreateRef {
199
* Sender(s)/Reciver(s)
202
friend class GrepParticipant;
204
friend bool printGREP_CREATE_REF(FILE *,
210
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
212
STATIC_CONST( SignalLength = 6 );
219
Uint32 subscriptionId;
220
Uint32 subscriptionKey;
221
Uint32 subscriptionType;
226
* @class GrepCreateConf
229
class GrepCreateConf {
231
* Sender(s)/Reciver(s)
234
friend class GrepParticipant;
236
friend bool printGREP_CREATE_CONF(FILE *,
241
STATIC_CONST( SignalLength = 6 );
245
Uint32 subscriptionId;
246
Uint32 subscriptionKey;
247
Uint32 subscriptionType;
251
/*****************************************************************************
252
* START Between SS and PS (DB and REP nodes)
253
*****************************************************************************/
256
* @class GrepSubStartReq
259
class GrepSubStartReq {
261
* Sender(s)/Reciver(s)
265
friend bool printGREP_SUB_START_REQ(FILE *,
270
STATIC_CONST( SignalLength = 5 );
271
Uint32 subscriptionId;
272
Uint32 subscriptionKey;
279
* @class GrepSubStartRef
282
class GrepSubStartRef {
284
* Sender(s)/Reciver(s)
288
friend bool printGREP_SUB_START_REF(FILE *,
293
STATIC_CONST( SignalLength = 6 );
294
Uint32 subscriptionId;
295
Uint32 subscriptionKey;
305
* @class GrepSubStartConf
308
class GrepSubStartConf {
310
* Sender(s)/Reciver(s)
314
friend bool printGREP_SUB_START_CONF(FILE *,
319
STATIC_CONST( SignalLength = 6 );
321
Uint32 subscriptionId;
322
Uint32 subscriptionKey;
330
/*****************************************************************************
331
* START Internal between PS DB nodes
332
*****************************************************************************/
335
* @class GrepStartReq
340
* Sender(s)/Reciver(s)
342
friend class GrepParticipant;
344
friend bool printGREP_START_REQ(FILE *,
349
STATIC_CONST( SignalLength = 4 );
353
Uint32 subscriptionId;
354
Uint32 subscriptionKey;
359
* @class GrepStartRef
364
* Sender(s)/Reciver(s)
367
friend class GrepParticipant;
369
friend bool printGREP_START_REF(FILE *,
375
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
377
STATIC_CONST( SignalLength = 6 );
381
Uint32 subscriptionId;
382
Uint32 subscriptionKey;
391
* @class GrepStartConf
394
class GrepStartConf {
396
* Sender(s)/Reciver(s)
399
friend class GrepParticipant;
401
friend bool printGREP_START_CONF(FILE *,
406
STATIC_CONST( SignalLength = 7 );
411
Uint32 subscriptionId;
412
Uint32 subscriptionKey;
418
/*****************************************************************************
419
* SCAN (SYNC) Between SS and PS (REP and DB nodes)
420
*****************************************************************************/
423
* @class GrepSubSyncReq
426
class GrepSubSyncReq {
428
* Sender(s)/Reciver(s)
432
friend bool printGREP_SUB_SYNC_REQ(FILE *,
437
STATIC_CONST( SignalLength = 5 );
438
Uint32 subscriptionId;
439
Uint32 subscriptionKey;
447
* @class GrepSubSyncRef
450
class GrepSubSyncRef {
452
* Sender(s)/Reciver(s)
456
friend bool printGREP_SUB_SYNC_REF(FILE *,
461
STATIC_CONST( SignalLength = 6 );
462
Uint32 subscriptionId;
463
Uint32 subscriptionKey;
472
* @class GrepSubSyncConf
475
class GrepSubSyncConf {
477
* Sender(s)/Reciver(s)
481
friend bool printGREP_SUB_SYNC_CONF(FILE *,
486
STATIC_CONST( SignalLength = 7 );
487
Uint32 subscriptionId;
488
Uint32 subscriptionKey;
498
/*****************************************************************************
499
* SCAN (SYNC) Internal between PS DB nodes
500
*****************************************************************************/
508
* Sender(s)/Reciver(s)
510
friend class GrepParticipant;
512
friend bool printGREP_SYNC_REQ(FILE *,
517
STATIC_CONST( SignalLength = 4 );
521
Uint32 subscriptionId;
522
Uint32 subscriptionKey;
532
* Sender(s)/Reciver(s)
535
friend class GrepParticipant;
537
friend bool printGREP_SYNC_REF(FILE *,
543
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
545
STATIC_CONST( SignalLength = 6 );
549
Uint32 subscriptionId;
550
Uint32 subscriptionKey;
559
* @class GrepSyncConf
565
* Sender(s)/Reciver(s)
567
friend class GrepParticipant;
569
friend bool printGREP_SYNC_CONF(FILE *, const Uint32 *, Uint32, Uint16);
572
STATIC_CONST( SignalLength = 8 );
576
Uint32 subscriptionId;
577
Uint32 subscriptionKey;
583
/*****************************************************************************
584
* ABORT - remove subscription
585
*****************************************************************************/
588
* @class GrepSubRemoveReq
589
* @brief Between PS and SS
591
class GrepSubRemoveReq {
593
* Sender(s)/Reciver(s)
597
friend bool printGREP_SUB_REMOVE_REQ(FILE *, const Uint32 *,
600
STATIC_CONST( SignalLength = 4 );
604
Uint32 subscriptionId;
605
Uint32 subscriptionKey;
610
* @class GrepSubRemoveRef
611
* @brief Between PS and SS
613
class GrepSubRemoveRef {
615
* Sender(s)/Reciver(s)
619
friend bool printGREP_SUB_REMOVE_REF(FILE *, const Uint32 *,
622
STATIC_CONST( SignalLength = 5 );
626
Uint32 subscriptionId;
627
Uint32 subscriptionKey;
636
class GrepSubRemoveConf {
638
* Sender(s)/Reciver(s)
642
friend bool printGREP_SUB_REMOVE_CONF(FILE *,
647
STATIC_CONST( SignalLength = 4 );
651
Uint32 subscriptionId;
652
Uint32 subscriptionKey;
660
class GrepRemoveReq {
662
* Sender(s)/Reciver(s)
664
friend class GrepParticipant;
666
friend bool printGREP_REMOVE_REQ(FILE *,
671
STATIC_CONST( SignalLength = 4 );
675
Uint32 subscriptionId;
676
Uint32 subscriptionKey;
684
class GrepRemoveRef {
686
* Sender(s)/Reciver(s)
689
friend class GrepParticipant;
691
friend bool printGREP_REMOVE_REF(FILE *,
697
NF_FakeErrorREF = GrepError::NF_FakeErrorREF
699
STATIC_CONST( SignalLength = 5 );
702
Uint32 subscriptionId;
703
Uint32 subscriptionKey;
715
class GrepRemoveConf {
717
* Sender(s)/Reciver(s)
720
friend class GrepParticipant;
722
friend bool printGREP_REMOVE_CONF(FILE *,
727
STATIC_CONST( SignalLength = 5 );
730
Uint32 subscriptionId;
731
Uint32 subscriptionKey;
736
/*****************************************************************************
738
*****************************************************************************/
741
* @class GrepWaitGcpReq
744
class GrepWaitGcpReq {
746
* Sender(s)/Reciver(s)
749
friend class GrepParticipant;
751
friend bool printGREP_WAITGCP_REQ(FILE *, const Uint32 *,
754
STATIC_CONST( SignalLength = 5 );
758
Uint32 subscriptionId;
759
Uint32 subscriptionKey;
764
* @class GrepWaitGcpConf
767
class GrepWaitGcpConf {
769
* Sender(s)/Reciver(s)
772
friend class GrepParticipant;
774
friend bool printGREP_WAITGCP_CONF(FILE *,
779
STATIC_CONST( SignalLength = 4 );
782
Uint32 subscriptionId;
783
Uint32 subscriptionKey;
789
class GrepCreateSubscriptionIdConf {
792
friend bool printGREP_CREATE_SUBSCRIPTION_ID_CONF(FILE *, const Uint32 *,
795
STATIC_CONST( SignalLength = 3 );
797
Uint32 subscriptionId;
798
Uint32 subscriptionKey;
799
union { // Haven't decide what to call it
801
Uint32 subscriberData;
809
friend bool printGREP_START_ME(FILE *, const Uint32 *,
812
STATIC_CONST( SignalLength = 1 );
820
* @class GrepAddSubReq
823
class GrepAddSubReq {
825
* Sender(s)/Reciver(s)
827
friend class GrepParticipant;
829
friend bool printGREP_ADD_SUB_REQ(FILE *,
834
STATIC_CONST( SignalLength = 7 );
837
Uint32 subscriberData;
838
Uint32 subscriberRef;
839
Uint32 subscriptionId;
840
Uint32 subscriptionKey;
841
Uint32 subscriptionType;
846
* @class GrepAddSubRef
849
class GrepAddSubRef {
851
* Sender(s)/Reciver(s)
854
friend class GrepParticipant;
856
friend bool printGREP_CREATE_REF(FILE *,
861
STATIC_CONST( SignalLength = 5 );
864
Uint32 subscriptionId;
865
Uint32 subscriptionKey;
866
Uint32 subscriptionType;
871
* @class GrepAddSubConf
874
class GrepAddSubConf {
876
* Sender(s)/Reciver(s)
879
friend class GrepParticipant;
881
friend bool printGREP_CREATE_CONF(FILE *,
886
STATIC_CONST( SignalLength = 1 );