1 /* Copyright (c) 2003-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 "SignalData.hpp"
20 #include <NodeBitmask.hpp>
23 * Request to start a backup
29 friend class MgmtSrvr
;
36 friend bool printBACKUP_REQ(FILE *, const Uint32
*, Uint32
, Uint16
);
38 STATIC_CONST( SignalLength
= 3 );
43 /* & 0x3 - waitCompleted
52 friend class BackupMaster
;
59 friend bool printBACKUP_DATA(FILE *, const Uint32
*, Uint32
, Uint16
);
61 STATIC_CONST( SignalLength
= 25 );
67 BufferSize
= 1, // In MB
68 BlockSize
= 2, // Write in chunks of this (in bytes)
69 MinWrite
= 3, // Minimum write as multiple of blocksize
70 MaxWrite
= 4, // Maximum write as multiple of blocksize
76 TableName
= 1001 // char*
92 * totalLen = totalLen_offset >> 16
93 * offset = totalLen_offset & 0xFFFF
95 Uint32 totalLen_offset
;
98 * Length in this = signal->length() - 3
99 * Sender block ref = signal->senderBlockRef()
101 Uint32 backupData
[21];
105 * The request to start a backup was refused
116 friend class MgmtSrvr
;
118 friend bool printBACKUP_REF(FILE *, const Uint32
*, Uint32
, Uint16
);
120 STATIC_CONST( SignalLength
= 3 );
126 OutOfBackupRecord
= 1302,
127 OutOfResources
= 1303,
128 SequenceFailure
= 1304,
129 BackupDefinitionNotImplemented
= 1305,
130 CannotBackupDiskless
= 1306
140 * The backup has started
151 friend class MgmtSrvr
;
153 friend bool printBACKUP_CONF(FILE *, const Uint32
*, Uint32
, Uint16
);
155 STATIC_CONST( SignalLength
= 2 + NdbNodeBitmask::Size
);
160 NdbNodeBitmask nodes
;
164 * A backup has been aborted
166 class BackupAbortRep
{
175 friend class MgmtSrvr
;
177 friend bool printBACKUP_ABORT_REP(FILE *, const Uint32
*, Uint32
, Uint16
);
179 STATIC_CONST( SignalLength
= 3 );
188 * A backup has been completed
190 class BackupCompleteRep
{
199 friend class MgmtSrvr
;
201 friend bool printBACKUP_COMPLETE_REP(FILE *, const Uint32
*, Uint32
, Uint16
);
203 STATIC_CONST( SignalLength
= 10 + NdbNodeBitmask::Size
);
210 Uint32 noOfRecordsLow
;
212 Uint32 noOfLogRecords
;
213 NdbNodeBitmask nodes
;
214 Uint32 noOfBytesHigh
;
215 Uint32 noOfRecordsHigh
;
219 * A master has finished taking-over backup responsiblility
221 class BackupNFCompleteRep
{
222 friend bool printBACKUP_NF_COMPLETE_REP(FILE*, const Uint32
*, Uint32
, Uint16
);
228 class AbortBackupOrd
{
233 friend class MgmtSrvr
;
235 friend bool printABORT_BACKUP_ORD(FILE *, const Uint32
*, Uint32
, Uint16
);
237 STATIC_CONST( SignalLength
= 3 );
241 BackupComplete
= 1322,
242 BackupFailure
= 1323, // General backup failure coordinator -> slave
243 LogBufferFull
= 1324, // slave -> coordinator
244 FileOrScanError
= 1325, // slave -> coordinator
245 BackupFailureDueToNodeFail
= 1326, // slave -> slave
246 OkToClean
= 1327 // master -> slave
249 ,IncompatibleVersions
= 1329