MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dblqh::LogFileRecord Struct Reference

#include <Dblqh.hpp>

Public Types

enum  FileChangeState {
  NOT_ONGOING = 0, BOTH_WRITES_ONGOING = 1, LAST_WRITE_ONGOING = 2, FIRST_WRITE_ONGOING = 3,
  WRITE_PAGE_ZERO_ONGOING = 4
}
enum  LogFileStatus {
  LFS_IDLE = 0, CLOSED = 1, OPENING_INIT = 2, OPEN_SR_FRONTPAGE = 3,
  OPEN_SR_LAST_FILE = 4, OPEN_SR_NEXT_FILE = 5, OPEN_EXEC_SR_START = 6, OPEN_EXEC_SR_NEW_MBYTE = 7,
  OPEN_SR_FOURTH_PHASE = 8, OPEN_SR_FOURTH_NEXT = 9, OPEN_SR_FOURTH_ZERO = 10, OPENING_WRITE_LOG = 11,
  OPEN_EXEC_LOG = 12, CLOSING_INIT = 13, CLOSING_SR = 14, CLOSING_EXEC_SR = 15,
  CLOSING_EXEC_SR_COMPLETED = 16, CLOSING_WRITE_LOG = 17, CLOSING_EXEC_LOG = 18, OPEN_INIT = 19,
  OPEN = 20, OPEN_SR_READ_INVALIDATE_PAGES = 21, CLOSE_SR_READ_INVALIDATE_PAGES = 22, OPEN_SR_WRITE_INVALIDATE_PAGES = 23,
  CLOSE_SR_WRITE_INVALIDATE_PAGES = 24, OPEN_SR_READ_INVALIDATE_SEARCH_FILES = 25, CLOSE_SR_READ_INVALIDATE_SEARCH_FILES = 26, CLOSE_SR_READ_INVALIDATE_SEARCH_LAST_FILE = 27,
  OPEN_EXEC_LOG_CACHED = 28, CLOSING_EXEC_LOG_CACHED = 29
}

Public Attributes

UintR * logLastPrepRef
UintR * logMaxGciCompleted
UintR * logMaxGciStarted
UintR fileName [4]
UintR currentLogpage
UintR currentMbyte
FileChangeState fileChangeState
UintR fileNo
UintR filePosition
UintR fileRef
UintR firstFilledPage
UintR firstLfo
UintR lastLfo
UintR lastFilledPage
UintR lastPageWritten
UintR lastWordWritten
LogFileStatus logFileStatus
UintR logPageZero
UintR logPartRec
UintR nextLogFile
UintR prevLogFile
UintR remainingWordsInMbyte
Uint16 currentFilepage
Uint16 noLogpagesInBuffer
Uint32 nextList
Uint32 prevList

Detailed Description

This record contains information about a log file. A log file contains log records from several tables and fragments of a table. LQH can contain more than one log file to ensure faster log processing.

The number of pages to write to disk at a time is configurable.

Definition at line 1441 of file Dblqh.hpp.

Member Enumeration Documentation

Enumerator:
LFS_IDLE 

Log file record not in use.

CLOSED 

Log file closed.

OPEN_SR_FRONTPAGE 

Log file opened as part of system restart. Open file 0 to find the front page of the log part.

OPEN_SR_LAST_FILE 

Open last log file that was written before the system restart.

OPEN_SR_NEXT_FILE 

Open a log file which is 16 files backwards to find the next information about GCPs.

OPEN_EXEC_SR_START 

Log file opened as part of executing log during system restart.

OPENING_WRITE_LOG 

Log file opened as part of writing log during normal operation.

CLOSING_SR 

Log file closed as part of system restart. Currently trying to find where to start executing the log

CLOSING_EXEC_SR 

Log file closed as part of executing log during system restart

CLOSING_WRITE_LOG 

Log file closed as part of writing log during normal operation.

OPEN 

Log file open.

Definition at line 1451 of file Dblqh.hpp.

Member Data Documentation

Uint16 Dblqh::LogFileRecord::currentFilepage

The current file page within the current log file. This is a reference within the file and not a reference to a log page record. It is used to deduce where log records are written. Particularly completed gcp records and prepare log records.

Definition at line 1619 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::currentLogpage

This variable has a reference to the log page which is currently in use by the log.

Definition at line 1528 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::currentMbyte

The number of the current mbyte in the log file.

Definition at line 1532 of file Dblqh.hpp.

FileChangeState Dblqh::LogFileRecord::fileChangeState

This variable is used when changing files. It is to find out when both the last write in the previous file and the first write in this file has been completed. After these writes have completed the variable keeps track of when the write to page zero in file zero is completed.

Definition at line 1540 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::fileName[4]

This variable contains the file name as needed by the file system when opening the file.

Definition at line 1523 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::fileNo

The number of the file within this log part.

Definition at line 1544 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::filePosition

This variable shows where to read/write the next pages into the log. Used when writing the log during normal operation and when reading the log during system restart. It specifies the page position where each page is 8 kbyte.

Definition at line 1551 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::fileRef

This contains the file pointer needed by the file system when reading/writing/closing and synching.

Definition at line 1556 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::firstFilledPage

The head of the pages waiting for shipment to disk. They are filled with log info.

Definition at line 1561 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::firstLfo

A list of active read/write operations on the log file. Operations are always put in last and the first should always complete first.

Definition at line 1567 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::lastFilledPage

The tail of the pages waiting for shipment to disk. They are filled with log info.

Definition at line 1573 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::lastPageWritten

This variable keeps track of the last written page in the file while writing page zero in file zero when changing log file.

Definition at line 1579 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::lastWordWritten

This variable keeps track of the last written word in the last page written in the file while writing page zero in file zero when changing log file.

Definition at line 1585 of file Dblqh.hpp.

LogFileStatus Dblqh::LogFileRecord::logFileStatus

This variable contains the last word written in the last page.

Definition at line 1589 of file Dblqh.hpp.

UintR* Dblqh::LogFileRecord::logLastPrepRef

When a new mbyte is started in the log we have to find out how far back in the log we still have prepared operations which have been neither committed or aborted. This variable keeps track of this value for each of the mbytes in this log file. This is used in writing down these values in the header of each log file. That information is used during system restart to find the tail of the log.

Definition at line 1508 of file Dblqh.hpp.

UintR* Dblqh::LogFileRecord::logMaxGciCompleted

The max global checkpoint completed before the mbyte in the log file was started. One variable per mbyte.

Definition at line 1513 of file Dblqh.hpp.

UintR* Dblqh::LogFileRecord::logMaxGciStarted

The max global checkpoint started before the mbyte in the log file was started. One variable per mbyte.

Definition at line 1518 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::logPageZero

A reference to page zero in this file. This page is written before the file is closed.

Definition at line 1594 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::logPartRec

This variable contains a reference to the record describing this log part. One of four records (0,1,2 or 3).

Definition at line 1599 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::nextLogFile

Next free log file record or next log file in this log.

Definition at line 1603 of file Dblqh.hpp.

Uint16 Dblqh::LogFileRecord::noLogpagesInBuffer

The number of pages in the list referenced by LOG_PAGE_BUFFER.

Definition at line 1624 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::prevLogFile

The previous log file.

Definition at line 1607 of file Dblqh.hpp.

UintR Dblqh::LogFileRecord::remainingWordsInMbyte

The number of remaining words in this mbyte of the log file.

Definition at line 1611 of file Dblqh.hpp.


The documentation for this struct was generated from the following file: