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

📄 dblqh.hpp

📁 mysql-5.0.22.tar.gz源码包
💻 HPP
📖 第 1 页 / 共 5 页
字号:
   *      request to TUP or ACC. Used for both local checkpoints and   *      system restart.   */  struct LcpLocRecord {    enum LcpLocstate {      IDLE = 0,      WAIT_TUP_PREPLCP = 1,      WAIT_LCPHOLDOP = 2,      HOLDOP_READY = 3,      ACC_WAIT_STARTED = 4,      ACC_STARTED = 5,      ACC_COMPLETED = 6,      TUP_WAIT_STARTED = 7,      TUP_STARTED = 8,      TUP_COMPLETED = 9,      SR_ACC_STARTED = 10,      SR_TUP_STARTED = 11,      SR_ACC_COMPLETED = 12,      SR_TUP_COMPLETED = 13    };    enum WaitingBlock {      ACC = 0,      TUP = 1,      NONE = 2    };        LcpLocstate lcpLocstate;    UintR locFragid;    UintR masterLcpRec;    UintR nextLcpLoc;    UintR tupRef;    WaitingBlock waitingBlock;    Uint32 accContCounter;  }; // 28 bytes  typedef Ptr<LcpLocRecord> LcpLocRecordPtr;    /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /*                                                                          */  /*       THE RECORDS THAT START BY LOG_ ARE A PART OF THE LOG MANAGER.      */  /*       THESE RECORDS ARE USED TO HANDLE THE FRAGMENT LOG.                 */  /*                                                                          */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /* $$$$$$$                       LOG RECORD                         $$$$$$$ */  /*                                                                          */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /*       THIS RECORD IS ALIGNED TO BE 256 BYTES.                            */  /* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */  /**          *       This record describes the current state of a log.    *       A log consists of a number of log files.    *       These log files are described by the log file record.   *   *       There will be 4 sets of log files.    *       Different tables will use different log files dependent    *       on the table id.    *       This  ensures that more than one outstanding request can    *       be sent to the file system.   *       The log file to use is found by performing a very simple hash   *       function.   */  struct LogPartRecord {    enum LogPartState {      IDLE = 0,                       ///< Nothing happens at the moment      ACTIVE = 1,                     ///< An operation is active logging       SR_FIRST_PHASE = 2,             ///< Finding the end of the log and                                       ///< the information about global                                       ///< checkpoints in the log is ongoing.      SR_FIRST_PHASE_COMPLETED = 3,   ///< First phase completed      SR_THIRD_PHASE_STARTED = 4,     ///< Executing fragment log is in 3rd ph      SR_THIRD_PHASE_COMPLETED = 5,      SR_FOURTH_PHASE_STARTED = 6,    ///< Finding the log tail and head                                       ///< is the fourth phase.      SR_FOURTH_PHASE_COMPLETED = 7,      FILE_CHANGE_PROBLEM = 8,        ///< For some reason the write to                                       ///< page zero in file zero have not                                         ///< finished after 15 mbyte of                                       ///< log data have been written      TAIL_PROBLEM = 9                ///< Only 1 mbyte of log left.                                       ///< No operations allowed to enter the                                       ///< log. Only special log records                                       ///< are allowed    };    enum WaitWriteGciLog {      WWGL_TRUE = 0,      WWGL_FALSE = 1    };    enum LogExecState {      LES_IDLE = 0,      LES_SEARCH_STOP = 1,      LES_SEARCH_START = 2,      LES_EXEC_LOG = 3,      LES_EXEC_LOG_NEW_MBYTE = 4,      LES_EXEC_LOG_NEW_FILE = 5,      LES_EXEC_LOGREC_FROM_FILE = 6,      LES_EXEC_LOG_COMPLETED = 7,      LES_WAIT_READ_EXEC_SR_NEW_MBYTE = 8,      LES_WAIT_READ_EXEC_SR = 9,      LES_EXEC_LOG_INVALIDATE = 10    };    /**     *       Is a CONTINUEB(ZLOG_LQHKEYREQ) signal sent and     *       outstanding. We do not want several instances of this     *       signal out in the air since that would create multiple     *       writers of the list.     */    UintR LogLqhKeyReqSent;    /**     *       Contains the current log file where log records are     *       written.  During system restart it is used to indicate the     *       last log file.     */    UintR currentLogfile;    /**     *       The log file used to execute log records from far behind.     */    UintR execSrExecLogFile;    /**     *       The currently executing prepare record starts in this log     *       page. This variable is used to enable that a log record is     *       executed multiple times in execution of the log.     */    UintR execSrLogPage;    /**     *       This variable keeps track of the lfo record where the     *       pages that were read from disk when an operations log     *       record were not found in the main memory buffer for log     *       pages.     */    UintR execSrLfoRec;    /**     *       The starting page number when reading log from far behind.     */    UintR execSrStartPageNo;    /**     *       The last page number when reading log from far behind.     */    UintR execSrStopPageNo;    /**     *       Contains a reference to the first log file, file number 0.     */    UintR firstLogfile;    /**     *       The head of the operations queued for logging.     */    UintR firstLogQueue;    /**      *       This variable contains the oldest operation in this log     *       part which have not been committed yet.     */    UintR firstLogTcrec;    /**     *       The first reference to a set of 8 pages. These are used     *       during execution of the log to keep track of which pages     *       are in memory and which are not.     */    UintR firstPageRef;    /**     *       This variable contains the global checkpoint record     *       waiting for disk writes to complete.     */    UintR gcprec;    /**     *       The last reference to a set of 8 pages.  These are used     *       during execution of the log to keep track of which pages     *       are in memory and which are not.     */    UintR lastPageRef;    /**     *       The tail of the operations queued for logging.                        */    UintR lastLogQueue;    /**     *       This variable contains the newest operation in this log     *       part which have not been committed yet.     */    UintR lastLogTcrec;    /**     *       This variable indicates which was the last mbyte that was     *       written before the system crashed.  Discovered during     *       system restart.     */    UintR lastLogfile;    /**     *       This variable is used to keep track of the state during     *       the third phase of the system restart, i.e. when     *       LogPartRecord::logPartState ==      *       LogPartRecord::SR_THIRD_PHASE_STARTED.     */    LogExecState logExecState;    /**     *       This variable contains the lap number of this log part.     */    UintR logLap;    /**     *       This variable contains the place to stop executing the log     *       in this phase.     */    UintR logLastGci;    /**     *       This variable contains the place to start executing the     *       log in this phase.     */    UintR logStartGci;    /**     *       The latest GCI completed in this log part.     */    UintR logPartNewestCompletedGCI;    /**     *       The current state of this log part.                                    */    LogPartState logPartState;    /**     *       A timer that is set every time a log page is sent to disk.     *       Ensures that log pages are not kept in main memory for     *       more than a certain time.     */    UintR logPartTimer;    /**     *       The current timer which is set by the periodic signal     *       received by LQH     */    UintR logTimer;    /**      *       Contains the number of the log tail file and the mbyte     *       reference within that file.  This information ensures that     *       the tail is not overwritten when writing new log records.     */    UintR logTailFileNo;    /**     *       The TcConnectionrec used during execution of this log part.     */    UintR logTcConrec;    /**     *       The number of pages that currently resides in the main     *       memory buffer.  It does not refer pages that are currently     *       read from the log files.  Only to pages already read     *       from the log file.     */    UintR mmBufferSize;    /**     *       Contains the current number of log files in this log part.      */    UintR noLogFiles;    /**     *       This variable is used only during execution of a log     *       record.  It keeps track of in which page record a log     *       record was started.  It is used then to deduce which     *       pages that are dirty after that the log records on the     *       page have been executed.     *     *       It is also used to find out where to write the invalidate     *       command when that is needed.     */    UintR prevLogpage;    /**     *       The number of files remaining to gather GCI information     *       for during system restart.  Only used if number of files     *       is larger than 60.     */    UintR srRemainingFiles;    /**     *       The log file where to start executing the log during     *       system restart.     */    UintR startLogfile;    /**     *       The last log file in which to execute the log during system      *       restart.                         */    UintR stopLogfile;    /**     *       This variable keeps track of when we want to write a complete      *       gci log record but have been blocked by an ongoing log operation.     */    WaitWriteGciLog waitWriteGciLog;    /**     *       The currently executing prepare record starts in this index      *       in the log page.                 */    Uint16 execSrLogPageIndex;    /**     *       Which of the four exec_sr's in the fragment is currently executing     */    Uint16 execSrExecuteIndex;    /**     *       The number of pages executed in the current mbyte.      */    Uint16 execSrPagesExecuted;    /**     *       The number of pages read from disk that have arrived and are      *       currently awaiting execution of the log.     */    Uint16 execSrPagesRead;    /**     *       The number of pages read from disk and currently not arrived      *       to the block.                  */    Uint16 execSrPagesReading;    /**     *       This variable refers to the new header file where we will      *       start writing the log after a system restart have been completed.     */    Uint16 headFileNo;    /**     *       This variable refers to the page number within the header file.     */    Uint16 headPageNo;    /**     *       This variable refers to the index within the new header     *       page.     */    Uint16 headPageIndex;    /**     *       This variables indicates which was the last mbyte in the last      *       logfile before a system crash. Discovered during system restart.     */    Uint16 lastMbyte;    /**     *       This variable is used only during execution of a log     *       record. It keeps track of in which file page a log     *       record was started.  It is used if it is needed to write a     *       dirty page to disk during log execution (this happens when     *       commit records are invalidated).     */    Uint16 prevFilepage;    /**     *       This is used to save where we were in the execution of log     *       records when we find a commit record that needs to be     *       executed.     *     *       This variable is also used to remember the index where the     *       log type was in the log record. It is only used in this     *       role when finding a commit record that needs to be     *       invalidated.     */    Uint16 savePageIndex;

⌨️ 快捷键说明

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