mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into zim.(none):/home/brian/mysql/mysql-5.1 configure.in: Auto merged mysql-test/mysql-test-run.sh: Auto merged sql/Makefile.am: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/lock.cc: Auto merged storage/innobase/btr/btr0pcur.c: Auto merged storage/innobase/dict/dict0dict.c: Auto merged storage/innobase/dict/dict0load.c: Auto merged storage/innobase/fil/fil0fil.c: Auto merged storage/innobase/include/btr0pcur.h: Auto merged storage/innobase/include/btr0pcur.ic: Auto merged storage/innobase/include/dict0dict.h: Auto merged storage/innobase/include/dict0load.h: Auto merged storage/innobase/include/os0file.h: Auto merged storage/innobase/include/srv0srv.h: Auto merged storage/innobase/log/log0log.c: Auto merged storage/innobase/os/os0file.c: Auto merged storage/innobase/row/row0ins.c: Auto merged storage/innobase/row/row0mysql.c: Auto merged storage/innobase/row/row0sel.c: Auto merged storage/innobase/srv/srv0srv.c: Auto merged storage/innobase/srv/srv0start.c: Auto merged storage/myisam/mi_check.c: Auto merged storage/myisam/mi_create.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_search.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisamdef.h: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/myrg_create.c: Auto merged storage/ndb/include/kernel/signaldata/BackupImpl.hpp: Auto merged storage/ndb/include/kernel/signaldata/BackupSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/TuxMaint.hpp: Auto merged storage/ndb/include/mgmapi/mgmapi_config_parameters.h: Auto merged storage/ndb/include/ndbapi/NdbScanOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbTransaction.hpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp: Auto merged storage/ndb/src/kernel/blocks/ERROR_codes.txt: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.cpp: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.hpp: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.txt: Auto merged storage/ndb/src/kernel/blocks/backup/BackupInit.cpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp: Auto merged storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/main.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/Notes.txt: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.hpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbIndexOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationDefine.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationSearch.cpp: Auto merged storage/ndb/src/ndbapi/NdbScanOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged storage/ndb/src/ndbapi/Ndbif.cpp: Auto merged storage/ndb/src/ndbapi/Ndblist.cpp: Auto merged storage/ndb/src/ndbapi/TransporterFacade.cpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged storage/ndb/test/ndbapi/Makefile.am: Auto merged storage/ndb/test/ndbapi/testBackup.cpp: Auto merged storage/ndb/test/ndbapi/testIndex.cpp: Auto merged storage/ndb/test/ndbapi/testNodeRestart.cpp: Auto merged storage/ndb/test/ndbapi/testOIBasic.cpp: Auto merged storage/ndb/test/ndbapi/testOperations.cpp: Auto merged storage/ndb/test/run-test/daily-basic-tests.txt: Auto merged storage/ndb/test/run-test/daily-devel-tests.txt: Auto merged storage/ndb/test/src/NdbBackup.cpp: Auto merged storage/ndb/tools/desc.cpp: Auto merged
This commit is contained in:
368
storage/ndb/include/kernel/signaldata/BackupImpl.hpp
Normal file
368
storage/ndb/include/kernel/signaldata/BackupImpl.hpp
Normal file
@@ -0,0 +1,368 @@
|
||||
/* 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 bool printDEFINE_BACKUP_REQ(FILE *, const Uint32 *, Uint32, Uint16);
|
||||
public:
|
||||
STATIC_CONST( SignalLength = 8 + 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;
|
||||
};
|
||||
|
||||
class DefineBackupRef {
|
||||
/**
|
||||
* Sender(s)
|
||||
*/
|
||||
friend class Backup;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* 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( MaxTableTriggers = 4 );
|
||||
STATIC_CONST( HeaderLength = 5 );
|
||||
STATIC_CONST( TableTriggerLength = 4);
|
||||
|
||||
private:
|
||||
Uint32 backupId;
|
||||
Uint32 backupPtr;
|
||||
Uint32 signalNo;
|
||||
Uint32 noOfSignals;
|
||||
Uint32 noOfTableTriggers;
|
||||
|
||||
struct TableTriggers {
|
||||
Uint32 tableId;
|
||||
Uint32 triggerIds[3];
|
||||
} tableTriggers[MaxTableTriggers];
|
||||
};
|
||||
|
||||
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 = 5 );
|
||||
|
||||
enum ErrorCode {
|
||||
FailedToAllocateTriggerRecord = 1
|
||||
};
|
||||
private:
|
||||
Uint32 backupId;
|
||||
Uint32 backupPtr;
|
||||
Uint32 signalNo;
|
||||
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 = 3 );
|
||||
|
||||
private:
|
||||
Uint32 backupId;
|
||||
Uint32 backupPtr;
|
||||
Uint32 signalNo;
|
||||
};
|
||||
|
||||
class BackupFragmentReq {
|
||||
/**
|
||||
* Sender(s)
|
||||
*/
|
||||
friend class BackupMaster;
|
||||
|
||||
/**
|
||||
* Reciver(s)
|
||||
*/
|
||||
friend class Backup;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Reciver(s)
|
||||
*/
|
||||
friend class BackupMaster;
|
||||
|
||||
friend bool printBACKUP_FRAGMENT_CONF(FILE *, const Uint32 *, Uint32, Uint16);
|
||||
public:
|
||||
STATIC_CONST( SignalLength = 6 );
|
||||
|
||||
private:
|
||||
Uint32 backupId;
|
||||
Uint32 backupPtr;
|
||||
Uint32 tableId;
|
||||
Uint32 fragmentNo;
|
||||
Uint32 noOfRecords;
|
||||
Uint32 noOfBytes;
|
||||
};
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user