MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Backup Class Reference

#include <Backup.hpp>

Inheritance diagram for Backup:
Collaboration diagram for Backup:

Classes

struct  BackupFile
struct  BackupRecord
class  CompoundState
struct  Config
struct  Fragment
struct  Node
struct  OperationRecord
struct  Page32
struct  Table
struct  TriggerRecord

Public Types

enum  State {
  INITIAL = 0, DEFINING = 1, DEFINED = 2, STARTED = 3,
  SCANNING = 4, STOPPING = 5, CLEANING = 6, ABORTING = 7
}
typedef Ptr< NodeNodePtr
typedef Ptr< Page32Page32Ptr
typedef Ptr< FragmentFragmentPtr
typedef Ptr< TableTablePtr
typedef Ptr< TriggerRecordTriggerPtr
typedef Ptr< BackupFileBackupFilePtr
typedef Ptr< BackupRecordBackupRecordPtr
- Public Types inherited from SimulatedBlock
typedef void(SimulatedBlock::* CallbackFunction )(class Signal *, Uint32 callbackData, Uint32 returnCode)

Public Member Functions

 Backup (Block_context &ctx, Uint32 instanceNumber=0)
 BLOCK_DEFINES (Backup)
 STATIC_CONST (NO_OF_PAGES_META_FILE=(2 *MAX_WORDS_META_FILE+BACKUP_WORDS_PER_PAGE-1)/BACKUP_WORDS_PER_PAGE)
void checkFile (Signal *, BackupFilePtr)
void checkScan (Signal *, BackupFilePtr)
void fragmentCompleted (Signal *, BackupFilePtr)
void backupAllData (Signal *signal, BackupRecordPtr)
void getFragmentInfo (Signal *, BackupRecordPtr, TablePtr, Uint32 fragNo)
void getFragmentInfoDone (Signal *, BackupRecordPtr)
void openFiles (Signal *signal, BackupRecordPtr ptr)
void openFilesReply (Signal *, BackupRecordPtr ptr, BackupFilePtr)
void closeFiles (Signal *, BackupRecordPtr ptr)
void closeFile (Signal *, BackupRecordPtr, BackupFilePtr)
void closeFilesDone (Signal *, BackupRecordPtr ptr)
void sendDefineBackupReq (Signal *signal, BackupRecordPtr ptr)
void defineBackupReply (Signal *signal, BackupRecordPtr ptr, Uint32 nodeId)
void createTrigReply (Signal *signal, BackupRecordPtr ptr)
void alterTrigReply (Signal *signal, BackupRecordPtr ptr)
void startBackupReply (Signal *signal, BackupRecordPtr ptr, Uint32)
void stopBackupReply (Signal *signal, BackupRecordPtr ptr, Uint32 nodeId)
void defineBackupRef (Signal *, BackupRecordPtr, Uint32 errCode=0)
void backupFragmentRef (Signal *signal, BackupFilePtr filePtr)
void nextFragment (Signal *, BackupRecordPtr)
void sendCreateTrig (Signal *, BackupRecordPtr ptr, TablePtr tabPtr)
void createAttributeMask (TablePtr tab, Bitmask< MAXNROFATTRIBUTESINWORDS > &)
void sendStartBackup (Signal *, BackupRecordPtr, TablePtr)
void sendAlterTrig (Signal *, BackupRecordPtr ptr)
void sendScanFragReq (Signal *, BackupRecordPtr, BackupFilePtr, TablePtr, FragmentPtr, Uint32 delay)
void sendDropTrig (Signal *, BackupRecordPtr ptr)
void sendDropTrig (Signal *signal, BackupRecordPtr ptr, TablePtr tabPtr)
void dropTrigReply (Signal *, BackupRecordPtr ptr)
void sendSignalAllWait (BackupRecordPtr ptr, Uint32 gsn, Signal *signal, Uint32 signalLength, bool executeDirect=false)
bool haveAllSignals (BackupRecordPtr ptr, Uint32 gsn, Uint32 nodeId)
void sendStopBackup (Signal *, BackupRecordPtr ptr)
void sendAbortBackupOrd (Signal *signal, BackupRecordPtr ptr, Uint32 errCode)
void sendAbortBackupOrdSlave (Signal *signal, BackupRecordPtr ptr, Uint32 errCode)
void masterAbort (Signal *, BackupRecordPtr ptr)
void masterSendAbortBackup (Signal *, BackupRecordPtr ptr)
void slaveAbort (Signal *, BackupRecordPtr ptr)
void abortFile (Signal *signal, BackupRecordPtr ptr, BackupFilePtr filePtr)
void abortFileHook (Signal *signal, BackupFilePtr filePtr, bool scanDone)
bool verifyNodesAlive (BackupRecordPtr, const NdbNodeBitmask &aNodeBitMask)
bool checkAbort (BackupRecordPtr ptr)
void checkNodeFail (Signal *signal, BackupRecordPtr ptr, NodeId newCoord, Uint32 theFailedNodes[NdbNodeBitmask::Size])
void masterTakeOver (Signal *signal, BackupRecordPtr ptr)
NodeId getMasterNodeId () const
bool findTable (const BackupRecordPtr &, TablePtr &, Uint32 tableId) const
bool parseTableDescription (Signal *, BackupRecordPtr ptr, TablePtr, const Uint32 *, Uint32)
bool insertFileHeader (BackupFormat::FileType, BackupRecord *, BackupFile *)
void sendBackupRef (Signal *signal, BackupRecordPtr ptr, Uint32 errorCode)
void sendBackupRef (BlockReference ref, Uint32 flags, Signal *signal, Uint32 senderData, Uint32 errorCode)
void dumpUsedResources ()
void cleanup (Signal *, BackupRecordPtr ptr)
void abort_scan (Signal *, BackupRecordPtr ptr)
void removeBackup (Signal *, BackupRecordPtr ptr)
void sendUtilSequenceReq (Signal *, BackupRecordPtr ptr, Uint32 delay=0)
void initReportStatus (Signal *signal, BackupRecordPtr ptr)
void checkReportStatus (Signal *signal, BackupRecordPtr ptr)
void reportStatus (Signal *signal, BackupRecordPtr ptr, BlockReference ref=CMVMI_REF)
void sendSTTORRY (Signal *)
void createSequence (Signal *signal)
void createSequenceReply (Signal *, class UtilSequenceConf *)
void lcp_open_file (Signal *signal, BackupRecordPtr ptr)
void lcp_open_file_done (Signal *, BackupRecordPtr)
void lcp_close_file_conf (Signal *signal, BackupRecordPtr)
void read_lcp_descriptor (Signal *, BackupRecordPtr, TablePtr)
bool ready_to_write (bool ready, Uint32 sz, bool eof, BackupFile *fileP)
void afterGetTabinfoLockTab (Signal *signal, BackupRecordPtr ptr, TablePtr tabPtr)
void cleanupNextTable (Signal *signal, BackupRecordPtr ptr, TablePtr tabPtr)
BackupFormat::LogFile::LogEntryget_log_buffer (Signal *, TriggerPtr, Uint32)
 STATIC_CONST (UserBackupInstanceKey=1)
Uint32 instanceKey (BackupRecordPtr ptr)
- Public Member Functions inherited from SimulatedBlock
void executeFunction (GlobalSignalNumber gsn, Signal *signal)
Uint32 instance () const
SimulatedBlockgetInstance (Uint32 instanceNumber)
void addInstance (SimulatedBlock *b, Uint32 theInstanceNo)
virtual void loadWorkers ()
void assignToThread (ThreadContext ctx)
uint32 getThreadId () const
void assertOwnThread ()
void synchronize_threads_for_blocks (Signal *, const Uint32 blocks[], const Callback &, JobBufferLevel=JBB)
void synchronize_path (Signal *, const Uint32 blocks[], const Callback &, JobBufferLevel=JBB)
virtual const char * get_filename (Uint32 fd) const
EmulatedJamBufferjamBuffer () const
void ignoreMutexUnlockCallback (Signal *signal, Uint32 ptrI, Uint32 retVal)
virtual bool getParam (const char *param, Uint32 *retVal)

Public Attributes

Uint32 * c_startOfPages
NodeId c_masterNodeId
SLList< Nodec_nodes
NdbNodeBitmask c_aliveNodes
DLList< BackupRecordc_backups
Config c_defaults
Uint32 m_curr_disk_write_speed
Uint32 m_words_written_this_period
Uint32 m_overflow_disk_write
Uint32 m_reset_delay_used
NDB_TICKS m_reset_disk_speed_time
Uint32 m_backup_report_frequency
ArrayPool< Tablec_tablePool
ArrayPool< BackupRecordc_backupPool
ArrayPool< BackupFilec_backupFilePool
ArrayPool< Page32c_pagePool
ArrayPool< Fragmentc_fragmentPool
ArrayPool< Nodec_nodePool
ArrayPool< TriggerRecordc_triggerPool
- Public Attributes inherited from SimulatedBlock
MutexManager c_mutexMgr
SafeCounterManager c_counterMgr

Static Public Attributes

static const Uint32 validSlaveTransitionsCount
static const Uint32 validMasterTransitionsCount
static const State validSlaveTransitions []
static const State validMasterTransitions []
static const int DISK_SPEED_CHECK_DELAY = 100

Protected Member Functions

void execSTTOR (Signal *signal)
void execREAD_CONFIG_REQ (Signal *signal)
void execDUMP_STATE_ORD (Signal *signal)
void execREAD_NODESCONF (Signal *signal)
void execNODE_FAILREP (Signal *signal)
void execINCL_NODEREQ (Signal *signal)
void execCONTINUEB (Signal *signal)
void execBACKUP_REF (Signal *signal)
void execBACKUP_CONF (Signal *signal)
void execBACKUP_ABORT_REP (Signal *signal)
void execBACKUP_COMPLETE_REP (Signal *signal)
void execDEFINE_BACKUP_REQ (Signal *signal)
void execBACKUP_DATA (Signal *signal)
void execSTART_BACKUP_REQ (Signal *signal)
void execBACKUP_FRAGMENT_REQ (Signal *signal)
void execBACKUP_FRAGMENT_COMPLETE_REP (Signal *signal)
void execSTOP_BACKUP_REQ (Signal *signal)
void execBACKUP_STATUS_REQ (Signal *signal)
void execABORT_BACKUP_ORD (Signal *signal)
void execSCAN_HBREP (Signal *signal)
void execTRANSID_AI (Signal *signal)
void execSCAN_FRAGREF (Signal *signal)
void execSCAN_FRAGCONF (Signal *signal)
void execBACKUP_TRIG_REQ (Signal *signal)
void execTRIG_ATTRINFO (Signal *signal)
void execFIRE_TRIG_ORD (Signal *signal)
void execLIST_TABLES_CONF (Signal *signal)
void execGET_TABINFOREF (Signal *signal)
void execGET_TABINFO_CONF (Signal *signal)
void execCREATE_TRIG_IMPL_REF (Signal *signal)
void execCREATE_TRIG_IMPL_CONF (Signal *signal)
void execDROP_TRIG_IMPL_REF (Signal *signal)
void execDROP_TRIG_IMPL_CONF (Signal *signal)
void execDIH_SCAN_TAB_CONF (Signal *signal)
void execDIH_SCAN_GET_NODES_CONF (Signal *signal)
void execFSOPENREF (Signal *signal)
void execFSOPENCONF (Signal *signal)
void execFSCLOSEREF (Signal *signal)
void execFSCLOSECONF (Signal *signal)
void execFSAPPENDREF (Signal *signal)
void execFSAPPENDCONF (Signal *signal)
void execFSREMOVEREF (Signal *signal)
void execFSREMOVECONF (Signal *signal)
void execBACKUP_REQ (Signal *signal)
void execABORT_BACKUP_REQ (Signal *signal)
void execDEFINE_BACKUP_REF (Signal *signal)
void execDEFINE_BACKUP_CONF (Signal *signal)
void execSTART_BACKUP_REF (Signal *signal)
void execSTART_BACKUP_CONF (Signal *signal)
void execBACKUP_FRAGMENT_REF (Signal *signal)
void execBACKUP_FRAGMENT_CONF (Signal *signal)
void execSTOP_BACKUP_REF (Signal *signal)
void execSTOP_BACKUP_CONF (Signal *signal)
void execBACKUP_STATUS_CONF (Signal *signal)
void execUTIL_SEQUENCE_REF (Signal *signal)
void execUTIL_SEQUENCE_CONF (Signal *signal)
void execWAIT_GCP_REF (Signal *signal)
void execWAIT_GCP_CONF (Signal *signal)
void execBACKUP_LOCK_TAB_CONF (Signal *signal)
void execBACKUP_LOCK_TAB_REF (Signal *signal)
void execLCP_PREPARE_REQ (Signal *signal)
void execLCP_FRAGMENT_REQ (Signal *)
void execEND_LCPREQ (Signal *signal)
void execDBINFO_SCANREQ (Signal *signal)
- Protected Member Functions inherited from SimulatedBlock
 SimulatedBlock (BlockNumber blockNumber, struct Block_context &ctx, Uint32 instanceNumber=0)
void addRecSignalImpl (GlobalSignalNumber g, ExecFunction fun, bool f=false)
void installSimulatedBlockFunctions ()
void initCommon ()
void TheNULLCallbackFunction (class Signal *, Uint32, Uint32)
void execute (Signal *signal, Callback &c, Uint32 returnCode)
void sendSignal (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf) const
void sendSignal (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf) const
void sendSignal (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections) const
void sendSignal (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections) const
void sendSignal (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, LinearSectionPtr ptr[3], Uint32 noOfSections) const
void sendSignal (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, LinearSectionPtr ptr[3], Uint32 noOfSections) const
void sendSignalNoRelease (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections) const
void sendSignalNoRelease (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections) const
void sendSignalWithDelay (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 delayInMilliSeconds, Uint32 length) const
void sendSignalWithDelay (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 delayInMilliSeconds, Uint32 length, SectionHandle *sections) const
void EXECUTE_DIRECT (Uint32 block, Uint32 gsn, Signal *signal, Uint32 len, Uint32 givenInstanceNo=ZNIL)
class SectionSegmentPoolgetSectionSegmentPool ()
void release (SegmentedSectionPtr &ptr)
void release (SegmentedSectionPtrPOD &ptr)
void releaseSection (Uint32 firstSegmentIVal)
void releaseSections (struct SectionHandle &)
bool import (Ptr< SectionSegment > &first, const Uint32 *src, Uint32 len)
bool import (SegmentedSectionPtr &ptr, const Uint32 *src, Uint32 len)
bool appendToSection (Uint32 &firstSegmentIVal, const Uint32 *src, Uint32 len)
bool dupSection (Uint32 &copyFirstIVal, Uint32 srcFirstIVal)
bool writeToSection (Uint32 firstSegmentIVal, Uint32 offset, const Uint32 *src, Uint32 len)
void handle_invalid_sections_in_send_signal (Signal *) const
void handle_lingering_sections_after_execute (Signal *) const
void handle_lingering_sections_after_execute (SectionHandle *) const
void handle_invalid_fragmentInfo (Signal *) const
void handle_send_failed (SendStatus, Signal *) const
void handle_out_of_longsignal_memory (Signal *) const
void sendRoutedSignal (RoutePath path[], Uint32 pathcnt, Uint32 dst[], Uint32 dstcnt, Uint32 gsn, Signal *, Uint32 len, JobBufferLevel prio, SectionHandle *handle=0)
bool checkNodeFailSequence (Signal *)
bool assembleFragments (Signal *signal)
bool assembleDroppedFragments (Signal *signal)
 STATIC_CONST (FRAGMENT_WORD_SIZE=240)
void sendFragmentedSignal (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections, Callback &=TheEmptyCallback, Uint32 messageSize=FRAGMENT_WORD_SIZE)
void sendFragmentedSignal (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections, Callback &=TheEmptyCallback, Uint32 messageSize=FRAGMENT_WORD_SIZE)
void sendFragmentedSignal (BlockReference ref, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, LinearSectionPtr ptr[3], Uint32 noOfSections, Callback &=TheEmptyCallback, Uint32 messageSize=FRAGMENT_WORD_SIZE)
void sendFragmentedSignal (NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, LinearSectionPtr ptr[3], Uint32 noOfSections, Callback &=TheEmptyCallback, Uint32 messageSize=FRAGMENT_WORD_SIZE)
Uint32 simBlockNodeFailure (Signal *signal, Uint32 failedNodeId, Callback &cb=TheEmptyCallback)
bool sendFirstFragment (FragmentSendInfo &info, NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, SectionHandle *sections, bool noRelease, Uint32 messageSize=FRAGMENT_WORD_SIZE)
bool sendFirstFragment (FragmentSendInfo &info, NodeReceiverGroup rg, GlobalSignalNumber gsn, Signal *signal, Uint32 length, JobBufferLevel jbuf, LinearSectionPtr ptr[3], Uint32 noOfSections, Uint32 messageSize=FRAGMENT_WORD_SIZE)
void sendNextSegmentedFragment (Signal *signal, FragmentSendInfo &info)
void sendNextLinearFragment (Signal *signal, FragmentSendInfo &info)
BlockNumber number () const
BlockReference reference () const
NodeId getOwnNodeId () const
void refresh_watch_dog (Uint32 place=1)
void update_watch_dog_timer (Uint32 interval)
void progError (int line, int err_code, const char *extradata=NULL) const ATTRIBUTE_NORETURN
NewVARIABLEallocateBat (int batSize)
void freeBat ()
BlockReference calcInstanceBlockRef (BlockNumber aBlock)
BlockReference calcInstanceBlockRef (BlockNumber aBlock, NodeId aNode)
void * allocRecord (const char *type, size_t s, size_t n, bool clear=true, Uint32 paramId=0)
void * allocRecordAligned (const char *type, size_t s, size_t n, void **unaligned_buffer, Uint32 align=NDB_O_DIRECT_WRITE_ALIGNMENT, bool clear=true, Uint32 paramId=0)
void deallocRecord (void **, const char *type, size_t s, size_t n)
Uint32 allocChunks (AllocChunk dst[], Uint32arraysize, Uint32rg, Uint32pages, Uint32 paramId)
void infoEvent (const char *msg,...) const ATTRIBUTE_FORMAT(printf
void void warningEvent (const char *msg,...) const ATTRIBUTE_FORMAT(printf
void void const NodeStategetNodeState () const
const NodeInfogetNodeInfo (NodeId nodeId) const
NodeInfosetNodeInfo (NodeId)
const NodeVersionInfogetNodeVersionInfo () const
NodeVersionInfosetNodeVersionInfo ()
Uint32 xfrm_key (Uint32 tab, const Uint32 *src, Uint32 *dst, Uint32 dstSize, Uint32 keyPartLen[MAX_ATTRIBUTES_IN_INDEX]) const
Uint32 xfrm_attr (Uint32 attrDesc, CHARSET_INFO *cs, const Uint32 *src, Uint32 &srcPos, Uint32 *dst, Uint32 &dstPos, Uint32 dstSize) const
Uint32 create_distr_key (Uint32 tableId, const Uint32 *src, Uint32 *dst, const Uint32 keyPaLen[MAX_ATTRIBUTES_IN_INDEX]) const
void wakeup ()
void setup_wakeup ()
void execNDB_TAMPER (Signal *signal)
void execNODE_STATE_REP (Signal *signal)
void execCHANGE_NODE_STATE_REQ (Signal *signal)
void execSIGNAL_DROPPED_REP (Signal *signal)
void execCONTINUE_FRAGMENTED (Signal *signal)
void execSTOP_FOR_CRASH (Signal *signal)
void execAPI_START_REP (Signal *signal)
void execNODE_START_REP (Signal *signal)
void execSEND_PACKED (Signal *signal)
void execLOCAL_ROUTE_ORD (Signal *)
Uint32 debugPrintFragmentCounts ()
void fsRefError (Signal *signal, Uint32 line, const char *msg)
void execFSWRITEREF (Signal *signal)
void execFSREADREF (Signal *signal)
void execFSSYNCREF (Signal *signal)
void execute (Signal *signal, CallbackPtr &cptr, Uint32 returnCode)
const CallbackEntrygetCallbackEntry (Uint32 ci)
void sendCallbackConf (Signal *signal, Uint32 fullBlockNo, CallbackPtr &cptr, Uint32 returnCode)
void execCALLBACK_CONF (Signal *signal)
void ndbinfo_send_row (Signal *signal, const DbinfoScanReq &req, const Ndbinfo::Row &row, Ndbinfo::Ratelimit &rl) const
void ndbinfo_send_scan_break (Signal *signal, DbinfoScanReq &req, const Ndbinfo::Ratelimit &rl, Uint32 data1, Uint32 data2=0, Uint32 data3=0, Uint32 data4=0) const
void ndbinfo_send_scan_conf (Signal *signal, DbinfoScanReq &req, const Ndbinfo::Ratelimit &rl) const

Friends

class BackupProxy
struct OperationRecord
class CompoundState
struct BackupRecord

Additional Inherited Members

- Static Public Member Functions inherited from SimulatedBlock
static bool isMultiThreaded ()
static bool isNdbMt ()
static bool isNdbMtLqh ()
static Uint32 getLqhWorkers ()
static Uint32 getInstanceKey (Uint32 tabId, Uint32 fragId)
static Uint32 getInstanceFromKey (Uint32 instanceKey)
- Protected Types inherited from SimulatedBlock
enum  CallbackFlags { CALLBACK_DIRECT = 0x0001, CALLBACK_ACK = 0x0002 }
enum  { THE_NULL_CALLBACK = 0 }
typedef void(SimulatedBlock::* ExecFunction )(Signal *signal)
- Static Protected Member Functions inherited from SimulatedBlock
static const NewVARIABLEgetBat (BlockNumber blockNo, Uint32 instanceNo)
static Uint16 getBatSize (BlockNumber blockNo, Uint32 instanceNo)
static BlockReference calcTcBlockRef (NodeId aNode)
static BlockReference calcLqhBlockRef (NodeId aNode)
static BlockReference calcAccBlockRef (NodeId aNode)
static BlockReference calcTupBlockRef (NodeId aNode)
static BlockReference calcTuxBlockRef (NodeId aNode)
static BlockReference calcDihBlockRef (NodeId aNode)
static BlockReference calcQmgrBlockRef (NodeId aNode)
static BlockReference calcDictBlockRef (NodeId aNode)
static BlockReference calcNdbCntrBlockRef (NodeId aNode)
static BlockReference calcTrixBlockRef (NodeId aNode)
static BlockReference calcBackupBlockRef (NodeId aNode)
static BlockReference calcSumaBlockRef (NodeId aNode)
static BlockReference calcApiClusterMgrBlockRef (NodeId aNode)
static int sortchunks (const void *, const void *)
- Protected Attributes inherited from SimulatedBlock
ExecFunction theExecArray [MAX_GSN+1]
Block_context m_ctx
SafeArrayPool< GlobalPage > & m_global_page_pool
ArrayPool< GlobalPage > & m_shared_page_pool
CallbackTablem_callbackTableAddr
 ERROR_INSERT_VARIABLE
- Static Protected Attributes inherited from SimulatedBlock
static Callback TheEmptyCallback = {0, 0}
static Callback TheNULLCallback

Detailed Description

Backup - This block manages database backup and restore

Definition at line 43 of file Backup.hpp.

Member Enumeration Documentation

State for BackupRecord

Definition at line 352 of file Backup.hpp.

Constructor & Destructor Documentation

Backup::Backup ( Block_context ctx,
Uint32  instanceNumber = 0 
)

Testing

Definition at line 32 of file BackupInit.cpp.

Here is the call graph for this function:

Member Function Documentation

void Backup::afterGetTabinfoLockTab ( Signal signal,
BackupRecordPtr  ptr,
TablePtr  tabPtr 
)

Done with all tables...

Fetch next table...

Definition at line 3669 of file Backup.cpp.

Here is the call graph for this function:

void Backup::backupAllData ( Signal signal,
BackupRecordPtr  ptr 
)

Get all tables from dict

Definition at line 3155 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::checkNodeFail ( Signal signal,
BackupRecordPtr  ptr,
NodeId  newCoord,
Uint32  theFailedNodes[NdbNodeBitmask::Size] 
)

Master died...abort

I'm master for this backup

I abort myself as slave if not master

Definition at line 1109 of file Backup.cpp.

Here is the call graph for this function:

void Backup::checkScan ( Signal signal,
BackupFilePtr  filePtr 
)

Close scan

Definition at line 4508 of file Backup.cpp.

Here is the call graph for this function:

void Backup::closeFiles ( Signal sig,
BackupRecordPtr  ptr 
)

Close all files

Definition at line 5153 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::createTrigReply ( Signal signal,
BackupRecordPtr  ptr 
)

Check finished with table

Next table

We've finished creating triggers.

send conf and wait

Definition at line 1908 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::defineBackupReply ( Signal signal,
BackupRecordPtr  ptr,
Uint32  nodeId 
)

Unlock mutexes

We've received GSN_DEFINE_BACKUP_CONF from all participants.

Our next step is to send START_BACKUP_REQ to all participants, who will then send CREATE_TRIG_REQ for all tables to their local DBTUP.

Definition at line 1693 of file Backup.cpp.

Here is the call graph for this function:

void Backup::execABORT_BACKUP_ORD ( Signal signal)
protected

Requests sent to master

Only scans are actively aborted

Requests sent to slave

Definition at line 5336 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execBACKUP_FRAGMENT_REQ ( Signal signal)
protected

Get backup record

Get file

Get table

Get fragment

Init operation

Check for space in buffer

Mark things as "in use"

Definition at line 4007 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execBACKUP_REF ( Signal signal)
protected

Testing

Definition at line 867 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::execBACKUP_REQ ( Signal signal)
protected

Master functinallity

Seize a backup record

Definition at line 1301 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execBACKUP_TRIG_REQ ( Signal signal)
protected

Trigger logging

Definition at line 4811 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execCREATE_TRIG_IMPL_CONF ( Signal signal)
protected

Verify that I'm waiting for this conf

ptr.p->masterRef != reference() as slaves and masters have triggers now.

Definition at line 1848 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execCREATE_TRIG_IMPL_REF ( Signal signal)
protected

Verify that I'm waiting for this ref

ptr.p->masterRef != reference() as slaves and masters have triggers now

Definition at line 1880 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execDEFINE_BACKUP_REQ ( Signal signal)
protected

Signals sent from master

Signal sent from myself -> record already seized

Allocate files

Not implemented

Definition at line 2958 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execDIH_SCAN_TAB_CONF ( Signal signal)
protected

DIH signals

Next table

Definition at line 3823 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execDUMP_STATE_ORD ( Signal signal)
protected

Print records

Print size of records etc.

Handle LCP

Definition at line 475 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execFIRE_TRIG_ORD ( Signal signal)
protected

dataPtr[0] : Primary key info dataPtr[1] : Before values dataPtr[2] : After values

Definition at line 4963 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execFSOPENREF ( Signal signal)
protected

FS signals

Reimplemented from SimulatedBlock.

Definition at line 3313 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execFSREMOVECONF ( Signal signal)
protected

Get backup record

Definition at line 5604 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execLCP_PREPARE_REQ ( Signal signal)
protected

LCP

Definition at line 5628 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execLIST_TABLES_CONF ( Signal signal)
protected

DICT signals

Definition at line 3171 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execSCAN_HBREP ( Signal signal)
protected

The actual scan

Definition at line 4165 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::execSTART_BACKUP_REQ ( Signal signal)
protected

Start file threads...

Tell DBTUP to create triggers

Definition at line 3961 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execSTOP_BACKUP_REQ ( Signal signal)
protected

At least one GCP must have passed

Get backup record

Destroy the triggers in local DBTUP we created

Definition at line 5118 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execTRANSID_AI ( Signal signal)
protected

Unpack data

Definition at line 4171 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execTRIG_ATTRINFO ( Signal signal)
protected

Backup is doing UNDO logging and don't need after values

Backup is doing REDO logging and don't need before values

Definition at line 4901 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::execWAIT_GCP_CONF ( Signal signal)
protected

Backup is complete - begin cleanup STOP_BACKUP_REQ is sent to participants. They then drop the local triggers

Make sure that we got entire stopGCP

Definition at line 2114 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::lcp_open_file ( Signal signal,
BackupRecordPtr  ptr 
)

Lcp file

Definition at line 5725 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::lcp_open_file_done ( Signal signal,
BackupRecordPtr  ptr 
)

Start file thread

Definition at line 5768 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::nextFragment ( Signal signal,
BackupRecordPtr  ptr 
)

Finished with all tables

Definition at line 2177 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::openFiles ( Signal signal,
BackupRecordPtr  ptr 
)

Ctl file

Log file

Data file

Definition at line 3244 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::openFilesReply ( Signal signal,
BackupRecordPtr  ptr,
BackupFilePtr  filePtr 
)

Mark files as "opened"

Check if all files have recived open_reply

Dont return FailedForBackupFilesAleadyExist cause this will make NdbBackup auto-retry with higher number :-)

Did open succeed for all files

Insert file headers

Start CTL file thread

Insert table list in ctl file

Start getting table definition data

Definition at line 3353 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Backup::parseTableDescription ( Signal signal,
BackupRecordPtr  ptr,
TablePtr  tabPtr,
const Uint32 *  tabdescptr,
Uint32  len 
)

LCP should not save disk attributes but only mem attributes

Initialize table object

Definition at line 3708 of file Backup.cpp.

Here is the call graph for this function:

void Backup::sendDefineBackupReq ( Signal signal,
BackupRecordPtr  ptr 
)

Sending define backup to all participants

Now send backup data

No data to send

Not implemented

Definition at line 1611 of file Backup.cpp.

void Backup::sendDropTrig ( Signal signal,
BackupRecordPtr  ptr 
)

Insert footers

Definition at line 2415 of file Backup.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Backup::sendScanFragReq ( Signal ,
BackupRecordPtr  ,
BackupFilePtr  ,
TablePtr  ,
FragmentPtr  ,
Uint32  delay 
)

Start scan

Definition at line 4087 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::sendStartBackup ( Signal signal,
BackupRecordPtr  ptr,
TablePtr  tabPtr 
)

We use trigger Ids that are unique to BACKUP. These don't interfere with other triggers (e.g. from DBDICT) as there is a special case in DBTUP.

Consequently, backups during online upgrade won't work

Definition at line 1971 of file Backup.cpp.

Here is the caller graph for this function:

void Backup::startBackupReply ( Signal signal,
BackupRecordPtr  ptr,
Uint32  nodeId 
)

Wait for GCP

Definition at line 2029 of file Backup.cpp.

Member Data Documentation

Uint32* Backup::c_startOfPages

Variables

Definition at line 548 of file Backup.hpp.

ArrayPool<Table> Backup::c_tablePool

Pools

Definition at line 574 of file Backup.hpp.

const Backup::State Backup::validSlaveTransitions
static
Initial value:
{
INITIAL, DEFINING,
DEFINING, DEFINED,
DEFINED, STARTED,
STARTED, STARTED,
STARTED, SCANNING,
SCANNING, STARTED,
STARTED, STOPPING,
STOPPING, CLEANING,
CLEANING, INITIAL,
INITIAL, ABORTING,
DEFINING, ABORTING,
DEFINED, ABORTING,
STARTED, ABORTING,
SCANNING, ABORTING,
STOPPING, ABORTING,
CLEANING, ABORTING,
ABORTING, ABORTING,
ABORTING, INITIAL,
INITIAL, INITIAL
}

Definition at line 365 of file Backup.hpp.

const Uint32 Backup::validSlaveTransitionsCount
static
Initial value:
sizeof(Backup::validSlaveTransitions) / sizeof(Backup::State)

Definition at line 363 of file Backup.hpp.


The documentation for this class was generated from the following files: