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

📄 dbtc.hpp

📁 mysql-5.0.22.tar.gz源码包
💻 HPP
📖 第 1 页 / 共 5 页
字号:
    TcFiredTriggerData() {}    /**     * Trigger id, used to identify the trigger     **/    Uint32 triggerId;        /**     * The operation that fired the trigger     */    Uint32 fireingOperation;    /**     * Used for scrapping in case of node failure     */    Uint32 nodeId;    /**     * Trigger attribute info, primary key value(s)     */    AttributeBuffer::Head keyValues;        /**     * Trigger attribute info, attribute value(s) before operation     */    AttributeBuffer::Head beforeValues;        /**     * Trigger attribute info, attribute value(s) after operation     */    AttributeBuffer::Head afterValues;    /**     * Next ptr (used in pool/list)     */    union {      Uint32 nextPool;      Uint32 nextList;      Uint32 nextHash;    };        /**     * Prev pointer (used in list)     */    union {      Uint32 prevList;      Uint32 prevHash;    };        inline void print(NdbOut & s) const {       s << "[FiredTriggerData = " << triggerId << "]";     }    inline Uint32 hashValue() const {      return fireingOperation ^ nodeId;    }    inline bool equal(const TcFiredTriggerData & rec) const {      return fireingOperation == rec.fireingOperation && nodeId == rec.nodeId;    }  };  typedef Ptr<TcFiredTriggerData> FiredTriggerPtr;    /**   * Pool of trigger data record   */  ArrayPool<TcFiredTriggerData> c_theFiredTriggerPool;  DLHashTable<TcFiredTriggerData> c_firedTriggerHash;  AttributeBuffer::DataBufferPool c_theTriggerAttrInfoPool;  Uint32 c_maxNumberOfDefinedTriggers;  Uint32 c_maxNumberOfFiredTriggers;  struct AttrInfoRecord {    /**     * Pre-allocated AttrInfo signal     */    AttrInfo attrInfo;    /**     * Next ptr (used in pool/list)     */    union {      Uint32 nextPool;      Uint32 nextList;    };    /**     * Prev pointer (used in list)     */    Uint32 prevList;  };  /* ************* INDEX DATA *************** */  /* THIS RECORD FORMS LISTS OF ACTIVE        */  /* INDEX FOR EACH TABLE.                    */  /* THE RECORDS ARE MANAGED BY A INDEX       */  /* POOL WHERE AN INDEX RECORD IS SEIZED     */  /* WHEN AN INDEX IS CREATED AND RELEASED    */  /* WHEN THE INDEX IS DROPPED.               */  /* **************************************** */  struct TcIndexData {    /**     *  IndexState     */    IndexState indexState;    /**     * Index id, same as index table id in DICT     */    Uint32 indexId;        /**     * Index attribute list.  Only the length is used in v21x.     */    AttributeList attributeList;    /**     * Primary table id, the primary table to be indexed     */    Uint32 primaryTableId;    /**     *  Primary key position in secondary table     */    Uint32 primaryKeyPos;    /**     * Next ptr (used in pool/list)     */    union {      Uint32 nextPool;      Uint32 nextList;    };    /**     * Prev pointer (used in list)     */    Uint32 prevList;  };    typedef Ptr<TcIndexData> TcIndexDataPtr;    /**   * Pool of index data record   */  ArrayPool<TcIndexData> c_theIndexPool;    /**   * The list of defined indexes   */    ArrayList<TcIndexData> c_theIndexes;  UintR c_maxNumberOfIndexes;  struct TcIndexOperation {    TcIndexOperation(AttributeBuffer::DataBufferPool & abp) :      indexOpState(IOS_NOOP),      expectedKeyInfo(0),      keyInfo(abp),      expectedAttrInfo(0),      attrInfo(abp),      expectedTransIdAI(0),      transIdAI(abp),      indexReadTcConnect(RNIL)    {}    ~TcIndexOperation()    {    }        // Index data    Uint32 indexOpId;    IndexOperationState indexOpState; // Used to mark on-going TcKeyReq    Uint32 expectedKeyInfo;    AttributeBuffer keyInfo;   // For accumulating IndxKeyInfo    Uint32 expectedAttrInfo;    AttributeBuffer attrInfo; // For accumulating IndxAttrInfo    Uint32 expectedTransIdAI;    AttributeBuffer transIdAI; // For accumulating TransId_AI        TcKeyReq tcIndxReq;    UintR connectionIndex;    UintR indexReadTcConnect; //        /**     * Next ptr (used in pool/list)     */    union {      Uint32 nextPool;      Uint32 nextList;    };    /**     * Prev pointer (used in list)     */    Uint32 prevList;  };    typedef Ptr<TcIndexOperation> TcIndexOperationPtr;    /**   * Pool of index data record   */  ArrayPool<TcIndexOperation> c_theIndexOperationPool;  UintR c_maxNumberOfIndexOperations;     /************************** API CONNECT RECORD ***********************   * The API connect record contains the connection record to which the   * application connects.     *   * The application can send one operation at a time.  It can send a    * new operation immediately after sending the previous operation.    * Thereby several operations can be active in one transaction within TC.    * This is achieved by using the API connect record.    * Each active operation is handled by the TC connect record.    * As soon as the TC connect record has sent the        * request to the LQH it is ready to receive new operations.    * The LQH connect record takes care of waiting for an operation to         * complete.     * When an operation has completed on the LQH connect record,    * a new operation can be started on this LQH connect record.    *******************************************************************   *                                                                      *       API CONNECT RECORD ALIGNED TO BE 256 BYTES                     ********************************************************************/    /*******************************************************************>*/  // We break out the API Timer for optimisation on scanning rather than  // on fast access.  /*******************************************************************>*/  inline void setApiConTimer(Uint32 apiConPtrI, Uint32 value, Uint32 line){    c_apiConTimer[apiConPtrI] = value;    c_apiConTimer_line[apiConPtrI] = line;  }  inline Uint32 getApiConTimer(Uint32 apiConPtrI) const {    return c_apiConTimer[apiConPtrI];  }  UintR* c_apiConTimer;  UintR* c_apiConTimer_line;  struct ApiConnectRecord {    ApiConnectRecord(ArrayPool<TcFiredTriggerData> & firedTriggerPool,		     ArrayPool<TcIndexOperation> & seizedIndexOpPool):      theFiredTriggers(firedTriggerPool),      isIndexOp(false),      theSeizedIndexOperations(seizedIndexOpPool)     {}        //---------------------------------------------------    // First 16 byte cache line. Hot variables.    //---------------------------------------------------    ConnectionState apiConnectstate;    UintR transid[2];    UintR firstTcConnect;    NdbNodeBitmask m_transaction_nodes;         //---------------------------------------------------    // Second 16 byte cache line. Hot variables.    //---------------------------------------------------    UintR lqhkeyconfrec;    UintR cachePtr;    UintR currSavePointId;    UintR counter;        //---------------------------------------------------    // Third 16 byte cache line. First and second cache    // line plus this will be enough for copy API records.    // Variables used in late phases.    //---------------------------------------------------    UintR nextGcpConnect;    UintR prevGcpConnect;    UintR gcpPointer;    UintR ndbapiConnect;        //---------------------------------------------------    // Fourth 16 byte cache line. Only used in late phases.    // Plus 4 bytes of error handling.    //---------------------------------------------------    UintR nextApiConnect;    BlockReference ndbapiBlockref;    UintR apiCopyRecord;    UintR globalcheckpointid;        //---------------------------------------------------    // Second 64 byte cache line starts. First 16 byte    // cache line in this one. Variables primarily used    // in early phase.    //---------------------------------------------------    UintR lastTcConnect;    UintR lqhkeyreqrec;    AbortState abortState;    Uint32 buddyPtr;    Uint8 m_exec_flag;    Uint8 unused2;    Uint8 takeOverRec;    Uint8 currentReplicaNo;        //---------------------------------------------------    // Error Handling variables. If cache line 32 bytes    // ensures that cache line is still only read in    // early phases.    //---------------------------------------------------    union {      UintR apiScanRec;      UintR commitAckMarker;    };    UintR currentTcConnect;    BlockReference tcBlockref;    Uint16 returncode;    Uint16 takeOverInd;        //---------------------------------------------------    // Second 64 byte cache line. Third 16 byte cache line    // in this one. Variables primarily used in early phase    // and checked in late phase.    // Fourth cache line is the tcSendArray that is used    // when two and three operations are responded to in    // parallel. The first two entries in tcSendArray is    // part of the third cache line.    //---------------------------------------------------    //---------------------------------------------------    // timeOutCounter is used waiting for ABORTCONF, COMMITCONF    // and COMPLETECONF    //---------------------------------------------------    UintR failureNr;    Uint8 tckeyrec; // 膎drad fr錸 R    Uint8 tcindxrec;    Uint8 apiFailState; // 膎drad fr錸 R    ReturnSignal returnsignal;    Uint8 timeOutCounter;        UintR tcSendArray[6];        // Trigger data        /**     * The list of fired triggers     */      DLFifoList<TcFiredTriggerData> theFiredTriggers;        bool triggerPending; // Used to mark waiting for a CONTINUEB        // Index data        bool isIndexOp;      // Used to mark on-going TcKeyReq as indx table access    bool indexOpReturn;    UintR noIndexOp;     // No outstanding index ops    // Index op return context    UintR indexOp;    UintR clientData;    UintR attrInfoLen;        UintR accumulatingIndexOp;    UintR executingIndexOp;    UintR tcIndxSendArray[6];    ArrayList<TcIndexOperation> theSeizedIndexOperations;  };    typedef Ptr<ApiConnectRecord> ApiConnectRecordPtr;  /************************** TC CONNECT RECORD ************************/  /* *******************************************************************/  /* TC CONNECT RECORD KEEPS ALL INFORMATION TO CARRY OUT A TRANSACTION*/  /* THE TRANSACTION CONTROLLER ESTABLISHES CONNECTIONS TO DIFFERENT   */  /* BLOCKS TO CARRY OUT THE TRANSACTION. THERE CAN BE SEVERAL RECORDS */  /* PER ACTIVE TRANSACTION. THE TC CONNECT RECORD COOPERATES WITH THE */  /* API CONNECT RECORD FOR COMMUNICATION WITH THE API AND WITH THE    */  /* LQH CONNECT RECORD FOR COMMUNICATION WITH THE LQH'S INVOLVED IN   */  /* THE TRANSACTION. TC CONNECT RECORD IS PERMANENTLY CONNECTED TO A  */  /* RECORD IN DICT AND ONE IN DIH. IT CONTAINS A LIST OF ACTIVE LQH   */  /* CONNECT RECORDS AND A LIST OF STARTED BUT NOT ACTIVE LQH CONNECT  */  /* RECORDS. IT DOES ALSO CONTAIN A LIST OF ALL OPERATIONS THAT ARE   */  /* EXECUTED WITH THE TC CONNECT RECORD.                              */  /*******************************************************************>*/  /*       TC_CONNECT RECORD ALIGNED TO BE 128 BYTES                   */  /*******************************************************************>*/

⌨️ 快捷键说明

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