MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TakeOver.hpp
1 /*
2  Copyright (C) 2007 MySQL AB, 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 TAKE_OVER_HPP
20 #define TAKE_OVER_HPP
21 
23 {
24  enum Flags {
25  WAIT_LCP = 1
26  };
27 
28  Uint32 startingNodeId;
29  Uint32 senderRef;
30  Uint32 senderData;
31  Uint32 flags;
32 
33  STATIC_CONST( SignalLength = 4 );
34 };
35 
37 {
38  STATIC_CONST( SignalLength = 3 );
39 
40  Uint32 senderRef;
41  Uint32 senderData;
42  Uint32 errorCode;
43 };
44 
46 {
47  Uint32 startingNodeId;
48  Uint32 senderRef;
49  Uint32 senderData;
50 
51  STATIC_CONST( SignalLength = 3 );
52 };
53 
54 struct StartToReq
55 {
56  STATIC_CONST( SignalLength = 3 );
57 
58  Uint32 senderData;
59  Uint32 senderRef;
60  Uint32 startingNodeId;
61 };
62 
63 struct StartToRef
64 {
65  STATIC_CONST( SignalLength = 3 );
66 
67  Uint32 senderData;
68  Uint32 senderRef;
69  Uint32 errorCode;
70  Uint32 extra;
71 };
72 
73 struct StartToConf
74 {
75  STATIC_CONST( SignalLength = 3 );
76 
77  Uint32 senderData;
78  Uint32 sendingNodeId;
79  Uint32 startingNodeId;
80 };
81 
82 struct UpdateToReq
83 {
84  STATIC_CONST( SignalLength = 7 );
85 
86  enum RequestType
87  {
88  BEFORE_STORED = 7
89  ,AFTER_STORED = 8
90  ,BEFORE_COMMIT_STORED = 9
91  ,AFTER_COMMIT_STORED = 10
92  };
93 
94  Uint32 senderData;
95  Uint32 senderRef;
96  Uint32 requestType;
97  Uint32 startingNodeId;
98  Uint32 copyNodeId;
99  Uint32 tableId;
100  Uint32 fragmentNo;
101 };
102 
103 struct UpdateToRef
104 {
105  STATIC_CONST( SignalLength = 4 );
106 
107  enum ErrorCode {
108  CopyNodeInProgress = 1 // StartMe++
109  ,CopyFragInProgress = 2 // NG busy
110  ,UnknownRequest = 3
111  ,InvalidRequest = 4
112  ,UnknownTakeOver = 5
113  };
114 
115  Uint32 senderData;
116  Uint32 senderRef;
117  Uint32 errorCode;
118  Uint32 extra;
119 };
120 
122 {
123  STATIC_CONST( SignalLength = 3 );
124 
125  Uint32 senderData;
126  Uint32 sendingNodeId;
127  Uint32 startingNodeId;
128 };
129 
131 {
132  STATIC_CONST( SignalLength = 9 );
133 
134  enum ReplicaType {
135  STORED = 7,
136  COMMIT_STORED = 9,
137  START_LOGGING = 10
138  };
139 
140  Uint32 senderData;
141  Uint32 senderRef;
142  Uint32 tableId;
143  Uint32 fragId;
144  Uint32 startingNodeId;
145  Uint32 copyNodeId;
146  Uint32 startGci;
147  Uint32 replicaType;
148  Uint32 failedNodeId;
149 };
150 
152 {
153  STATIC_CONST( SignalLength = 6 );
154 
155  Uint32 senderData;
156  Uint32 tableId;
157  Uint32 fragId;
158  Uint32 sendingNodeId;
159  Uint32 startingNodeId;
160  Uint32 failedNodeId;
161 };
162 
163 struct EndToReq
164 {
165  STATIC_CONST( SignalLength = 4 );
166 
167  Uint32 senderData;
168  Uint32 senderRef;
169  Uint32 startingNodeId;
170  Uint32 flags;
171 };
172 
173 struct EndToRef
174 {
175  STATIC_CONST( SignalLength = 4 );
176 
177  Uint32 senderData;
178  Uint32 senderRef;
179  Uint32 errorCode;
180  Uint32 extra;
181 };
182 
183 struct EndToConf
184 {
185  STATIC_CONST( SignalLength = 3 );
186 
187  Uint32 senderData;
188  Uint32 sendingNodeId;
189  Uint32 startingNodeId;
190 };
191 
192 #endif