mariadb/storage/ndb/include/kernel/signaldata/BackupImpl.hpp
unknown 6848be9cc2 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb


mysql-test/mysql-test-run.sh:
  Auto merged
storage/ndb/include/kernel/signaldata/BackupContinueB.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/BackupImpl.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/BackupSignalData.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
sql/ha_ndbcluster.cc:
  manual merge
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  manual merge
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  manual merge
storage/ndb/include/kernel/signaldata/LqhFrag.hpp:
  manual merge
storage/ndb/include/kernel/signaldata/TupFrag.hpp:
  manual merge
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
  manual merge
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  manual merge
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
  manual merge
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  manual merge
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  manual merge
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  manual merge
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  manual merge
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  manual merge
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  manual merge
storage/ndb/src/ndbapi/NdbDictionary.cpp:
  manual merge
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  manual merge
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  manual merge
storage/ndb/tools/restore/Restore.cpp:
  manual merge
storage/ndb/tools/restore/Restore.hpp:
  manual merge
storage/ndb/tools/restore/consumer_restore.cpp:
  manual merge
2006-06-27 11:22:42 +02:00

385 lines
6.6 KiB
C++

/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef BACKUP_IMPL_HPP
#define BACKUP_IMPL_HPP
#include "SignalData.hpp"
#include <NodeBitmask.hpp>
class DefineBackupReq {
/**
* Sender(s)
*/
friend class BackupMaster;
/**
* Reciver(s)
*/
friend class Backup;
friend class Dblqh;
friend bool printDEFINE_BACKUP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 9 + NdbNodeBitmask::Size);
private:
/**
* i - value of backup object
*/
Uint32 backupPtr;
Uint32 backupId;
Uint32 clientRef;
Uint32 clientData;
Uint32 senderRef;
/**
* Which node(s) is participating in the backup
*/
NdbNodeBitmask nodes;
/**
* Generated random number
*/
Uint32 backupKey[2];
/**
* Length of backup data
*/
Uint32 backupDataLen;
/**
* Backup flags
*/
/* & 0x3 - waitCompleted
*/
Uint32 flags;
};
class DefineBackupRef {
/**
* Sender(s)
*/
friend class Backup;
friend class Dblqh;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printDEFINE_BACKUP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 4 );
enum ErrorCode {
Undefined = 1340,
FailedToAllocateBuffers = 1342,
FailedToSetupFsBuffers = 1343,
FailedToAllocateTables = 1344,
FailedInsertFileHeader = 1345,
FailedInsertTableList = 1346,
FailedAllocateTableMem = 1347,
FailedToAllocateFileRecord = 1348,
FailedToAllocateAttributeRecord = 1349
};
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 errorCode;
Uint32 nodeId;
};
class DefineBackupConf {
/**
* Sender(s)
*/
friend class Backup;
friend class Dblqh;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printDEFINE_BACKUP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 2 );
private:
Uint32 backupId;
Uint32 backupPtr;
};
class StartBackupReq {
/**
* Sender(s)
*/
friend class BackupMaster;
/**
* Reciver(s)
*/
friend class Backup;
friend bool printSTART_BACKUP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 2 );
private:
Uint32 backupId;
Uint32 backupPtr;
};
class StartBackupRef {
/**
* Sender(s)
*/
friend class Backup;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printSTART_BACKUP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 4 );
enum ErrorCode {
FailedToAllocateTriggerRecord = 1
};
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 errorCode;
Uint32 nodeId;
};
class StartBackupConf {
/**
* Sender(s)
*/
friend class Backup;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printSTART_BACKUP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 2 );
private:
Uint32 backupId;
Uint32 backupPtr;
};
class BackupFragmentReq {
/**
* Sender(s)
*/
friend class BackupMaster;
/**
* Reciver(s)
*/
friend class Backup;
friend class Dblqh;
friend bool printBACKUP_FRAGMENT_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 5 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 tableId;
Uint32 fragmentNo;
Uint32 count;
};
class BackupFragmentRef {
/**
* Sender(s)
*/
friend class Backup;
friend class Dblqh;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printBACKUP_FRAGMENT_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 5 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 errorCode;
Uint32 nodeId;
};
class BackupFragmentConf {
/**
* Sender(s)
*/
friend class Backup;
friend class Dblqh;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printBACKUP_FRAGMENT_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 8 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 tableId;
Uint32 fragmentNo;
Uint32 noOfRecordsLow;
Uint32 noOfBytesLow;
Uint32 noOfRecordsHigh;
Uint32 noOfBytesHigh;
};
class BackupFragmentCompleteRep {
public:
STATIC_CONST( SignalLength = 8 );
Uint32 backupId;
Uint32 backupPtr;
Uint32 tableId;
Uint32 fragmentNo;
Uint32 noOfTableRowsLow;
Uint32 noOfFragmentRowsLow;
Uint32 noOfTableRowsHigh;
Uint32 noOfFragmentRowsHigh;
};
class StopBackupReq {
/**
* Sender(s)
*/
friend class BackupMaster;
/**
* Reciver(s)
*/
friend class Backup;
friend bool printSTOP_BACKUP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 4 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 startGCP;
Uint32 stopGCP;
};
class StopBackupRef {
/**
* Sender(s)
*/
friend class Backup;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printSTOP_BACKUP_REF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 4 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 errorCode;
Uint32 nodeId;
};
class StopBackupConf {
/**
* Sender(s)
*/
friend class Backup;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printSTOP_BACKUP_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 4 );
private:
Uint32 backupId;
Uint32 backupPtr;
Uint32 noOfLogBytes;
Uint32 noOfLogRecords;
};
class BackupStatusReq {
/**
* Sender(s)
*/
friend class BackupMaster;
/**
* Reciver(s)
*/
friend class Backup;
friend bool printBACKUP_STATUS_REQ(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 1 );
private:
};
class BackupStatusConf {
/**
* Sender(s)
*/
friend class Backup;
/**
* Reciver(s)
*/
friend class BackupMaster;
friend bool printBACKUP_STATUS_CONF(FILE *, const Uint32 *, Uint32, Uint16);
public:
STATIC_CONST( SignalLength = 1 );
private:
};
#endif