⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbtup.hpp

📁 mysql-5.0.22.tar.gz源码包
💻 HPP
📖 第 1 页 / 共 5 页
字号:
          /* ************ LOCAL LOG FILE INFO ************* */          /* THIS RECORD HOLDS INFORMATION NEEDED DURING    */          /* CHECKPOINT AND RESTART. THERE ARE FOUR         */          /* PARALLELL UNDO LOG FILES, EACH ONE REPRESENTED */          /* BY AN ENTITY OF THIS RECORD.                   */          /* BECAUSE EACH FILE IS SHARED BETWEEN FOUR       */          /* TABLES AND HAS ITS OWN PAGEPOINTERS AND        */          /* WORDPOINTERS.                                  */          /* ********************************************** */struct LocalLogInfo {  Uint32 lliActiveLcp;                                   /* NUMBER OF ACTIVE LOCAL CHECKPOINTS ON THIS FILE */  Uint32 lliEndPageId;                                   /* PAGE IDENTIFIER OF LAST PAGE WITH LOG DATA      */  Uint32 lliPrevRecordId;                                /* PREVIOUS RECORD IN THIS LOGFILE                 */  Uint32 lliLogFilePage;                                 /* PAGE IN LOGFILE                                 */  Uint32 lliNumFragments;                                /* NO OF FRAGMENTS RESTARTING FROM THIS LOCAL LOG  */  Uint32 lliUndoBufferSegmentP;                          /* POINTER TO A DISK BUFFER SEGMENT POINTER (UNDO) */  Uint32 lliUndoFileHandle;                              /* FILE HANDLE OF UNDO LOG FILE                    */  Uint32 lliUndoPage;                                    /* UNDO PAGE IN BUFFER                             */  Uint32 lliUndoWord;  Uint32 lliUndoPagesToDiskWithoutSynch;};typedef Ptr<LocalLogInfo> LocalLogInfoPtr;struct Operationrec {// Easy to remove (2 words)  Uint32 attroutbufLen;  Uint32 logSize;// Needed (20 words)  State tupleState;  Uint32 prevActiveOp;  Uint32 nextActiveOp;  Uint32 nextOprecInList;  Uint32 prevOprecInList;  Uint32 tableRef;  Uint32 fragId;  Uint32 fragmentPtr;  Uint32 fragPageId;  Uint32 realPageId;  bool undoLogged;  Uint32 realPageIdC;  Uint32 fragPageIdC;  Uint32 firstAttrinbufrec;  Uint32 lastAttrinbufrec;  Uint32 attrinbufLen;  Uint32 currentAttrinbufLen;  Uint32 userpointer;  State transstate;  Uint32 savePointId;// Easy to remove (3 words)  Uint32 tcOperationPtr;  Uint32 transid1;  Uint32 transid2;// Needed (2 words)  Uint16 pageIndex;  Uint16 pageOffset;  Uint16 pageOffsetC;  Uint16 pageIndexC;// Hard to remove  Uint16 tupVersion;// Easy to remove (1.5 word)  BlockReference recBlockref;  BlockReference userblockref;  Uint16 storedProcedureId;  Uint8 inFragList;  Uint8 inActiveOpList;  Uint8 deleteInsertFlag;// Needed (1 word)  Uint8 dirtyOp;  Uint8 interpretedExec;  Uint8 optype;  Uint8 opSimple;// Used by triggers  Uint32 primaryReplica;  BlockReference coordinatorTC;  Uint32 tcOpIndex;  Uint32 gci;  Uint32 noFiredTriggers;  union {    Uint32 hashValue; // only used in TUP_COMMITREQ    Uint32 lastRow;  };  Bitmask<MAXNROFATTRIBUTESINWORDS> changeMask;};typedef Ptr<Operationrec> OperationrecPtr;struct Page {  Uint32 pageWord[ZWORDS_ON_PAGE];};typedef Ptr<Page> PagePtr;          /* ****************************** PAGE RANGE RECORD ************************** */          /* PAGE RANGES AND BASE PAGE ID. EACH RANGE HAS A  CORRESPONDING BASE PAGE ID  */          /* THAT IS USED TO  CALCULATE REAL PAGE ID FROM A FRAGMENT PAGE ID AND A TABLE */          /* REFERENCE.                                                                  */          /* THE PAGE RANGES ARE ORGANISED IN A B-TREE FASHION WHERE THE VARIABLE TYPE   */          /* SPECIFIES IF A LEAF NODE HAS BEEN REACHED. IF A LEAF NODE HAS BEEN REACHED  */          /* THEN BASE_PAGE_ID IS THE BASE_PAGE_ID OF THE SET OF PAGES THAT WAS          */          /* ALLOCATED IN THAT RANGE. OTHERWISE BASE_PAGE_ID IS THE POINTER TO THE NEXT  */          /* PAGE_RANGE RECORD.                                                          */          /* *************************************************************************** */struct PageRange {  Uint32 startRange[4];                                  /* START OF RANGE                                   */  Uint32 endRange[4];                                    /* END OF THIS RANGE                                */  Uint32 basePageId[4];                                  /* BASE PAGE ID.                                    *//*----               VARIABLE BASE_PAGE_ID2 (4) 8 DS NEEDED WHEN SUPPORTING 40 BIT PAGE ID           -------*/  Uint8 type[4];                                        /* TYPE OF BASE PAGE ID                             */  Uint32 nextFree;                                       /* NEXT FREE PAGE RANGE RECORD                      */  Uint32 parentPtr;                                      /* THE PARENT TO THE PAGE RANGE REC IN THE B-TREE   */  Uint8 currentIndexPos;};typedef Ptr<PageRange> PageRangePtr;          /* *********** PENDING UNDO WRITE INFO ********** */          /* THIS RECORD HOLDS INFORMATION NEEDED DURING    */          /* A FILE OPEN OPERATION                          */          /* IF THE FILE OPEN IS A PART OF A CHECKPOINT THE */          /* CHECKPOINT_INFO_P WILL HOLD A POINTER TO THE   */          /* CHECKPOINT_INFOR_PTR RECORD                    */          /* IF IT IS A PART OF RESTART THE PFO_RESTART_INFO*/          /* ELEMENT WILL POINT TO A RESTART INFO RECORD    */          /* ********************************************** */struct PendingFileOpenInfo {  Uint32 pfoNextRec;  State pfoOpenType;  Uint32 pfoCheckpointInfoP;  Uint32 pfoRestartInfoP;};typedef Ptr<PendingFileOpenInfo> PendingFileOpenInfoPtr;struct RestartInfoRecord {  Uint32 sriNextRec;  State sriState;                                       /* BLOCKREFERENCE TO THE REQUESTING BLOCK           */  Uint32 sriUserptr;                                     /* USERPOINTER TO THE REQUESTING BLOCK              */  Uint32 sriDataBufferSegmentP;                          /* POINTER TO A DISK BUFFER SEGMENT POINTER (DATA)  */  Uint32 sriDataFileHandle;                              /* FILE HANDLE TO THE OPEN DATA FILE                */  Uint32 sriCheckpointVersion;                           /* CHECKPOINT VERSION TO RESTART FROM               */  Uint32 sriFragid;                                      /* FRAGMENT ID                                      */  Uint32 sriFragP;                                       /* FRAGMENT POINTER                                 */  Uint32 sriTableId;                                     /* TABLE ID                                         */  Uint32 sriLocalLogInfoP;                               /* POINTER TO A LOCAL LOG INFO RECORD               */  Uint32 sriNumDataPages;                                /* NUMBER OF DATA PAGES TO READ                     */  Uint32 sriCurDataPageFromBuffer;                       /* THE CHECKPOINT IS COMPLETED                      */  BlockReference sriBlockref;};typedef Ptr<RestartInfoRecord> RestartInfoRecordPtr;  /* ************* TRIGGER DATA ************* */  /* THIS RECORD FORMS LISTS OF ACTIVE       */  /* TRIGGERS FOR EACH TABLE.                 */  /* THE RECORDS ARE MANAGED BY A TRIGGER     */  /* POOL wHERE A TRIGGER RECORD IS SEIZED    */  /* WHEN A TRIGGER IS ACTIVATED AND RELEASED */  /* WHEN THE TRIGGER IS DEACTIVATED.         */  /* **************************************** */struct TupTriggerData {    /**   * Trigger id, used by DICT/TRIX to identify the trigger   */  Uint32 triggerId;  /**   * Index id is needed for ordered index.   */  Uint32 indexId;  /**   * Trigger type etc, defines what the trigger is used for   */  TriggerType::Value triggerType;  TriggerActionTime::Value triggerActionTime;  TriggerEvent::Value triggerEvent;  /**   * Receiver block   */  Uint32 m_receiverBlock;    /**   * Monitor all replicas, i.e. trigger will fire on all nodes where tuples   * are stored   */  bool monitorReplicas;  /**   * Monitor all attributes, the trigger monitors all changes to attributes    * in the table   */  bool monitorAllAttributes;  /**   * Send only changed attributes at trigger firing time.   */  bool sendOnlyChangedAttributes;  /**   * Send also before values at trigger firing time.   */  bool sendBeforeValues;  /**   * Attribute mask, defines what attributes are to be monitored   * Can be seen as a compact representation of SQL column name list   */  Bitmask<MAXNROFATTRIBUTESINWORDS> attributeMask;    /**   * Next ptr (used in pool/list)   */  union {    Uint32 nextPool;    Uint32 nextList;  };    /**   * Prev pointer (used in list)   */  Uint32 prevList;  inline void print(NdbOut & s) const { s << "[TriggerData = " << triggerId << "]"; };};typedef Ptr<TupTriggerData> TriggerPtr;  /** * Pool of trigger data record */ArrayPool<TupTriggerData> c_triggerPool;          /* ************ TABLE RECORD ************ */          /* THIS RECORD FORMS A LIST OF TABLE      */          /* REFERENCE INFORMATION. ONE RECORD      */          /* PER TABLE REFERENCE.                   */          /* ************************************** */struct Tablerec {  Tablerec(ArrayPool<TupTriggerData> & triggerPool) :     afterInsertTriggers(triggerPool),    afterDeleteTriggers(triggerPool),    afterUpdateTriggers(triggerPool),    subscriptionInsertTriggers(triggerPool),    subscriptionDeleteTriggers(triggerPool),    subscriptionUpdateTriggers(triggerPool),    constraintUpdateTriggers(triggerPool),    tuxCustomTriggers(triggerPool)  {}  Bitmask<MAXNROFATTRIBUTESINWORDS> notNullAttributeMask;  ReadFunction* readFunctionArray;  UpdateFunction* updateFunctionArray;  CHARSET_INFO** charsetArray;  Uint32 readKeyArray;  Uint32 tabDescriptor;  Uint32 attributeGroupDescriptor;  bool   GCPIndicator;  bool   checksumIndicator;  Uint16 tupheadsize;  Uint16 noOfAttr;  Uint16 noOfKeyAttr;  Uint16 noOfCharsets;  Uint16 noOfNewAttr;  Uint16 noOfNullAttr;  Uint16 noOfAttributeGroups;  Uint8  tupChecksumIndex;  Uint8  tupNullIndex;  Uint8  tupNullWords;  Uint8  tupGCPIndex;  // Lists of trigger data for active triggers  ArrayList<TupTriggerData> afterInsertTriggers;  ArrayList<TupTriggerData> afterDeleteTriggers;  ArrayList<TupTriggerData> afterUpdateTriggers;  ArrayList<TupTriggerData> subscriptionInsertTriggers;  ArrayList<TupTriggerData> subscriptionDeleteTriggers;  ArrayList<TupTriggerData> subscriptionUpdateTriggers;  ArrayList<TupTriggerData> constraintUpdateTriggers;  // List of ordered indexes  ArrayList<TupTriggerData> tuxCustomTriggers;  Uint32 fragid[2 * MAX_FRAG_PER_NODE];  Uint32 fragrec[2 * MAX_FRAG_PER_NODE];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -