1 /* Copyright (c) 2003, 2005, 2006 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 */
19 #include <NodeBitmask.hpp>
22 * This is the first distributed signal
23 * (the node tries to register in the cluster)
27 * Sender(s) & Reciver(s)
32 STATIC_CONST( SignalLength
= 5 + NdbNodeBitmask::Size
);
37 Uint32 version
; // See ndb_version.h
39 Uint32 start_type
; // As specified by cmd-line or mgm, NodeState::StartType
40 Uint32 latest_gci
; // 0 means no fs
41 Uint32 skip_nodes
[NdbNodeBitmask::Size
]; // Nodes that does not _need_
42 // to be part of restart
46 * The node receving this signal has been accepted into the cluster
50 * Sender(s) & Reciver(s)
55 STATIC_CONST( SignalLength
= 4 + NdbNodeBitmask::Size
);
58 Uint32 presidentBlockRef
;
59 Uint32 presidentNodeId
;
60 Uint32 presidentVersion
;
63 * The dynamic id that the node reciving this signal has
66 Uint32 allNdbNodes
[NdbNodeBitmask::Size
];
74 * Sender(s) & Reciver(s)
79 STATIC_CONST( SignalLength
= 7 + NdbNodeBitmask::Size
);
82 ZBUSY
= 0, /* Only the president can send this */
83 ZBUSY_PRESIDENT
= 1,/* Only the president can send this */
84 ZBUSY_TO_PRES
= 2, /* Only the president can send this */
85 ZNOT_IN_CFG
= 3, /* Only the president can send this */
86 ZELECTION
= 4, /* Receiver is definitely not president,
87 * but we are not sure if sender ends up
89 ZNOT_PRESIDENT
= 5, /* We are not president */
90 ZNOT_DEAD
= 6, /* We are not dead when we are starting */
91 ZINCOMPATIBLE_VERSION
= 7,
92 ZINCOMPATIBLE_START_TYPE
= 8,
93 ZSINGLE_USER_MODE
= 9, /* The cluster is in single user mode,
94 * data node is not allowed to get added
95 * in the cluster while in single user mode */
96 ZGENERIC
= 100 /* The generic error code */
104 * Applicable if ZELECTION
106 Uint32 presidentCandidate
;
107 Uint32 candidate_latest_gci
; // 0 means non
110 * Data for sending node sending node
114 Uint32 skip_nodes
[NdbNodeBitmask::Size
]; // Nodes that does not _need_
115 // to be part of restart
120 * Sender(s) & Reciver(s)
125 STATIC_CONST( SignalLength
= 3 );
135 Uint32 startingNodeId
;
136 Uint32 startingVersion
;
141 * Sender(s) & Reciver(s)
146 STATIC_CONST( SignalLength
= 3 );
150 Uint32 requestType
; // see CmAdd::RequestType
151 Uint32 startingNodeId
;
154 class CmNodeInfoReq
{
156 * Sender(s) & Reciver(s)
161 STATIC_CONST( SignalLength
= 3 );
165 * This is information for sending node (starting node)
172 class CmNodeInfoRef
{
174 * Sender(s) & Reciver(s)
179 STATIC_CONST( SignalLength
= 3 );
190 class CmNodeInfoConf
{
192 * Sender(s) & Reciver(s)
197 STATIC_CONST( SignalLength
= 3 );