mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / kernel / signaldata / WaitGCP.hpp
blobb86a4b14503fa798c69e28ad3c653536f0d3657f
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 */
16 #ifndef WAIT_GCP_HPP
17 #define WAIT_GCP_HPP
19 /**
20 * This signal is sent by anyone to local DIH
22 * If local DIH is not master, it forwards it to master DIH
23 * and start acting as a proxy
26 class WaitGCPReq {
28 /**
29 * Sender(s) / Reciver(s)
31 friend class Dbdih;
33 /**
34 * Sender
36 friend class Ndbcntr;
37 friend class Dbdict;
38 friend class Backup;
39 //friend class Grep::PSCoord;
41 public:
42 STATIC_CONST( SignalLength = 3 );
43 public:
44 enum RequestType {
45 Complete = 1, ///< Wait for a GCP to complete
46 CompleteForceStart = 2, ///< Wait for a GCP to complete start one if needed
47 CompleteIfRunning = 3, ///< Wait for ongoing GCP
48 CurrentGCI = 8, ///< Immediately return current GCI
49 BlockStartGcp = 9,
50 UnblockStartGcp = 10
53 Uint32 senderRef;
54 Uint32 senderData;
55 Uint32 requestType;
58 class WaitGCPConf {
60 /**
61 * Sender(s) / Reciver(s)
63 friend class Dbdih;
65 /**
66 * Reciver(s)
68 friend class Ndbcntr;
69 friend class Dbdict;
70 friend class Backup;
71 //friend class Grep::PSCoord;
73 public:
74 STATIC_CONST( SignalLength = 3 );
76 public:
77 Uint32 senderData;
78 Uint32 gcp;
79 Uint32 blockStatus;
82 class WaitGCPRef {
84 /**
85 * Sender(s) / Reciver(s)
87 friend class Dbdih;
89 /**
90 * Reciver(s)
92 friend class Ndbcntr;
93 friend class Dbdict;
94 friend class Backup;
95 friend class Grep;
97 public:
98 STATIC_CONST( SignalLength = 2 );
100 enum ErrorCode {
101 StopOK = 0,
102 NF_CausedAbortOfProcedure = 1,
103 NoWaitGCPRecords = 2
106 private:
107 Uint32 errorCode;
108 Uint32 senderData;
111 #endif