38#ifndef log0constants_h
39#define log0constants_h
100 "A valid log size can be created with LOG_N_FILES");
211#define LOG_HEADER_CREATOR_CURRENT "MySQL " INNODB_VERSION_STR
214#define LOG_HEADER_CREATOR_CLONE "MySQL Clone"
309 "Header + footer cannot be larger than the whole log block.");
320 "Overhead in LSN sequence cannot be bigger than actual data.");
#define UINT32_MAX
Definition: lexyy.cc:86
constexpr os_offset_t LOG_CHECKPOINT_LSN
Checkpoint lsn.
Definition: log0constants.h:245
constexpr sn_t SN_LOCKED
The sn bit to express locked state.
Definition: log0constants.h:162
constexpr uint32_t LOG_HEADER_FLAG_MAX
Maximum BIT position number.
Definition: log0constants.h:236
constexpr ulong INNODB_LOG_FLUSH_NOTIFIER_TIMEOUT_DEFAULT
Default value of innodb_log_flush_notifier_timeout (in microseconds).
Definition: log0constants.h:482
constexpr uint32_t LOG_AGGRESSIVE_CHECKPOINT_RATIO_MIN
Controls when the aggressive checkpointing should be started, with regards to the free space in the r...
Definition: log0constants.h:392
constexpr lsn_t LOG_START_LSN
The counting of lsn's starts from this value: this must be non-zero.
Definition: log0constants.h:153
constexpr uint32_t MLOG_TEST_REC_OVERHEAD
Bytes occupied by MLOG_TEST record with an empty payload.
Definition: log0constants.h:550
constexpr os_offset_t LOG_CHECKPOINT_1
First checkpoint field in the log header.
Definition: log0constants.h:167
constexpr uint32_t LOG_FILE_NAME_MAX_LENGTH
Maximum length of log file name, computed as: base name length(8)
Definition: log0constants.h:80
constexpr uint32_t LOG_BLOCK_FLUSH_BIT_MASK
Mask used to get the highest bit in the hdr_no field.
Definition: log0constants.h:257
constexpr ulint INNODB_LOG_WRITE_MAX_SIZE_DEFAULT
Default value of innodb_log_write_max_size (in bytes).
Definition: log0constants.h:413
constexpr uint32_t LOG_BLOCK_HDR_SIZE
Size of the log block's header in bytes.
Definition: log0constants.h:297
constexpr ulong INNODB_LOG_WRITE_AHEAD_SIZE_MIN
Minimum allowed value of innodb_log_write_ahead_size.
Definition: log0constants.h:524
constexpr const char *const LOG_FILE_BASE_NAME
Prefix of log file name in the current redo format.
Definition: log0constants.h:76
constexpr os_offset_t LOG_HEADER_CREATOR
A null-terminated string which will contain either the string 'MEB' and the MySQL version if the log ...
Definition: log0constants.h:197
constexpr ulong INNODB_LOG_EVENTS_MAX
Maximum allowed value of innodb_log_events.
Definition: log0constants.h:518
constexpr uint32_t LOG_BLOCK_HDR_DATA_LEN
Offset to number of bytes written to this block (also header bytes).
Definition: log0constants.h:263
constexpr os_offset_t LOG_FILE_MIN_SIZE
Minimum size of single log file, expressed in bytes.
Definition: log0constants.h:91
constexpr ulong INNODB_LOG_WAIT_FOR_WRITE_TIMEOUT_DEFAULT
Default value of innodb_log_wait_for_write_timeout (in microseconds).
Definition: log0constants.h:451
constexpr uint32_t LOG_BLOCK_DATA_SIZE
Size of log block's data fragment (where actual data is stored).
Definition: log0constants.h:312
constexpr double LOG_NEXT_FILE_EARLIER_MARGIN
Margin which is used ahead of log.write_lsn to create unused files earlier than the log....
Definition: log0constants.h:338
constexpr uint32_t LOG_HEADER_FLAG_NO_LOGGING
Flag at BIT-1 to indicate if redo logging is disabled or not.
Definition: log0constants.h:220
constexpr ulong INNODB_LOG_RECENT_CLOSED_SIZE_MIN
Minimum allowed value of innodb_log_recent_closed_size.
Definition: log0constants.h:506
constexpr uint32_t LOG_HEADER_LOG_UUID
Offset within the log file header, to the field which stores the log_uuid.
Definition: log0constants.h:189
constexpr ulong INNODB_LOG_RECENT_WRITTEN_SIZE_DEFAULT
Default value of innodb_log_recent_written_size (in bytes).
Definition: log0constants.h:494
constexpr os_offset_t LOG_HEADER_ENCRYPTION_INFO_OFFSET
Offset to encryption information in the log encryption header.
Definition: log0constants.h:207
constexpr ulong INNODB_LOG_RECENT_CLOSED_SIZE_DEFAULT
Default value of innodb_log_recent_closed_size (in bytes).
Definition: log0constants.h:503
constexpr uint32_t MLOG_TEST_MAX_REC_LEN
Maximum size of single MLOG_TEST record (in bytes).
Definition: log0constants.h:544
constexpr double LOG_CONCCURENCY_MARGIN_MAX_PCT
The maximum limit for concurrency_margin expressed as percentage of the redo capacity available for u...
Definition: log0constants.h:366
constexpr uint32_t LOG_BLOCK_FIRST_REC_GROUP
Offset to "first_rec_group offset" stored in the log block header.
Definition: log0constants.h:280
constexpr uint32_t LOG_HEADER_FLAG_NOT_INITIALIZED
Flag at BIT-3 to indicate if server is not recoverable on crash because data directory still has not ...
Definition: log0constants.h:229
constexpr os_offset_t LOG_CAPACITY_MAX
Maximum allowed value for innodb_redo_log_capacity.
Definition: log0constants.h:97
constexpr os_offset_t LOG_HEADER_CREATOR_END
End of the log file creator field (we add 1 for \0).
Definition: log0constants.h:203
constexpr os_offset_t LOG_FILE_MAX_SIZE
Maximum size of a log file, expressed in bytes.
Definition: log0constants.h:103
constexpr uint32_t LOG_BLOCK_HDR_NO
Offset to hdr_no, which is a log block number and must be > 0.
Definition: log0constants.h:253
constexpr lsn_t LSN_MAX
Maximum possible lsn value is slightly higher than the maximum sn value, because lsn sequence enumera...
Definition: log0constants.h:159
constexpr ulong INNODB_LOG_WRITE_AHEAD_SIZE_DEFAULT
Default value of innodb_log_write_ahead_size (in bytes).
Definition: log0constants.h:521
constexpr ulint INNODB_LOG_WRITE_AHEAD_SIZE_MAX
Maximum allowed value of innodb_log_write_ahead_size.
Definition: log0constants.h:527
constexpr ulong INNODB_LOG_RECENT_WRITTEN_SIZE_MIN
Minimum allowed value of innodb_log_recent_written_size.
Definition: log0constants.h:497
constexpr ulong INNODB_LOG_CHECKPOINT_EVERY_DEFAULT
Default value of innodb_log_checkpointer_every (in milliseconds).
Definition: log0constants.h:416
constexpr uint32_t LOG_BLOCK_EPOCH_NO
Offset to epoch_no stored in this log block.
Definition: log0constants.h:294
constexpr ulong INNODB_LOG_EVENTS_DEFAULT
Default value of innodb_log_events (number of events).
Definition: log0constants.h:512
constexpr os_offset_t LOG_FILE_HDR_SIZE
Size of log file's header.
Definition: log0constants.h:176
constexpr uint32_t LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MIN
Controls when the speed of adaptive flushing of modified pages starts to increase.
Definition: log0constants.h:400
constexpr uint32_t LOG_NO_CHECKSUM_MAGIC
Magic value to use instead of log checksums when they are disabled.
Definition: log0constants.h:150
constexpr ulong INNODB_LOG_EVENTS_MIN
Minimum allowed value of innodb_log_events.
Definition: log0constants.h:515
constexpr ulong INNODB_LOG_WAIT_FOR_FLUSH_SPIN_DELAY_DEFAULT
Default value of innodb_log_wait_for_flush_spin_delay (in spin rounds).
Definition: log0constants.h:456
constexpr uint32_t LOG_HEADER_FLAG_FILE_FULL
Flag at BIT-4 to mark the redo log file as completely full and closed for any future writes.
Definition: log0constants.h:233
constexpr uint32_t LOG_BLOCK_ENCRYPT_BIT_MASK
Mask used to get the highest bit in the data len field, this bit is to indicate if this block is encr...
Definition: log0constants.h:267
constexpr os_offset_t LOG_CAPACITY_MIN
Minimum allowed value for innodb_redo_log_capacity.
Definition: log0constants.h:94
constexpr ulong INNODB_LOG_WRITE_NOTIFIER_TIMEOUT_DEFAULT
Default value of innodb_log_write_notifier_timeout (in microseconds).
Definition: log0constants.h:476
constexpr uint INNODB_LOG_SPIN_CPU_PCT_HWM_DEFAULT
Default value of innodb_log_spin_cpu_pct_hwm.
Definition: log0constants.h:436
constexpr ulong INNODB_LOG_FLUSH_NOTIFIER_SPIN_DELAY_DEFAULT
Default value of innodb_log_flush_notifier_spin_delay (in spin rounds).
Definition: log0constants.h:479
constexpr double LOG_EXTRA_CONC_MARGIN_PCT
Extra margin, reserved in the redo capacity for the concurrency margin.
Definition: log0constants.h:357
constexpr uint32_t LOG_FORCING_ADAPTIVE_FLUSH_RATIO_MAX
Controls when the maximum speed of adaptive flushing of modified pages is reached (with regards to fr...
Definition: log0constants.h:396
constexpr uint32_t LOG_FILES_DUMMY_INTAKE_SIZE
Number of bytes that might be generated by log_files_governor thread to fill up the current log file ...
Definition: log0constants.h:387
constexpr uint32_t LOG_BLOCK_TRL_SIZE
Size of the log block footer (trailer) in bytes.
Definition: log0constants.h:306
constexpr const char *const LOG_DIRECTORY_NAME
Name of subdirectory which contains redo log files.
Definition: log0constants.h:73
constexpr size_t LOG_N_FILES
Targeted number of log files.
Definition: log0constants.h:83
constexpr os_offset_t LOG_HEADER_SIZE
Current total size of LOG header.
Definition: log0constants.h:239
constexpr double LOG_N_FILES_MAX_DOWNSIZE_RATIO
Determines maximum downsize for maximum redo file size during resize.
Definition: log0constants.h:88
constexpr uint32_t LOG_BLOCK_MAX_NO
Maximum allowed block's number (stored in hdr_no) increased by 1.
Definition: log0constants.h:260
constexpr os_offset_t LOG_ENCRYPTION
Log Encryption information in redo log header.
Definition: log0constants.h:170
constexpr size_t LOG_BUFFER_ALIGNMENT
Align the log buffer (log_t::buf) to this size.
Definition: log0constants.h:56
constexpr uint32_t MLOG_TEST_GROUP_MAX_REC_N
Maximum number of MLOG_TEST records in single group of log records.
Definition: log0constants.h:547
constexpr uint32_t LOG_HEADER_FLAG_CRASH_UNSAFE
Flag at BIT-2 to indicate if server is not recoverable on crash.
Definition: log0constants.h:225
constexpr ulong INNODB_LOG_WAIT_FOR_FLUSH_SPIN_HWM_DEFAULT
Default value of innodb_log_wait_for_flush_spin_hwm (in microseconds).
Definition: log0constants.h:459
constexpr size_t LOG_HEADER_CREATOR_MAX_LENGTH
Maximum length of string with creator name (excludes \0).
Definition: log0constants.h:200
constexpr os_offset_t LOG_HEADER_FLAGS
32 BITs flag
Definition: log0constants.h:217
constexpr ulong INNODB_LOG_WRITER_SPIN_DELAY_DEFAULT
Default value of innodb_log_writer_spin_delay (in spin rounds).
Definition: log0constants.h:424
constexpr size_t LOG_WRITE_AHEAD_BUFFER_ALIGNMENT
Align the log write-ahead buffer (log_t::write_ahead_buf) to this size.
Definition: log0constants.h:61
constexpr int64_t MLOG_TEST_VALUE
Value to which MLOG_TEST records should sum up within a group.
Definition: log0constants.h:541
constexpr ulong INNODB_LOG_WAIT_FOR_FLUSH_TIMEOUT_DEFAULT
Default value of innodb_log_wait_for_flush_timeout (in microseconds).
Definition: log0constants.h:462
constexpr double LOG_EXTRA_WRITER_MARGIN_PCT
Extra margin, reserved in the redo capacity for the log writer thread.
Definition: log0constants.h:352
constexpr os_offset_t LOG_EXTRA_SAFETY_MARGIN
Extra safety margin in the redo capacity, never ever used !
Definition: log0constants.h:333
constexpr size_t LOG_BACKGROUND_THREADS_USING_RW_MTRS
Maximum number of concurrent background threads, that could be using mini transactions which are not ...
Definition: log0constants.h:374
constexpr ulong INNODB_LOG_WRITE_NOTIFIER_SPIN_DELAY_DEFAULT
Default value of innodb_log_write_notifier_spin_delay (in spin rounds).
Definition: log0constants.h:473
constexpr ulong INNODB_LOG_BUFFER_SIZE_MAX
Maximum allowed value of innodb_log_buffer_size.
Definition: log0constants.h:491
constexpr uint32_t LOG_BLOCK_CHECKSUM
4 byte checksum of the log block contents.
Definition: log0constants.h:303
constexpr os_offset_t LOG_HEADER_FORMAT
Log file header format identifier (32-bit unsigned big-endian integer).
Definition: log0constants.h:183
constexpr ulong INNODB_LOG_SPIN_CPU_ABS_LWM_DEFAULT
Default value of innodb_log_spin_cpu_abs_lwm.
Definition: log0constants.h:432
constexpr ulong INNODB_LOG_WAIT_FOR_WRITE_SPIN_DELAY_DEFAULT
Default value of innodb_log_wait_for_write_spin_delay (in spin rounds).
Definition: log0constants.h:448
constexpr ulong INNODB_LOG_BUFFER_SIZE_DEFAULT
Default value of innodb_log_buffer_size (in bytes).
Definition: log0constants.h:485
constexpr Log_file_id LOG_FIRST_FILE_ID
Id of the first redo log file (assigned to the first log file when new data directory is being initia...
Definition: log0constants.h:107
constexpr os_offset_t LOG_HEADER_START_LSN
LSN of the start of data in this log file (with format version 1 and 2).
Definition: log0constants.h:192
constexpr size_t LOG_MAX_OPEN_FILES
Maximum number of handles for opened redo log files (in parallel).
Definition: log0constants.h:135
constexpr ulong INNODB_LOG_FLUSHER_TIMEOUT_DEFAULT
Default value of innodb_log_flusher_timeout (in microseconds).
Definition: log0constants.h:470
constexpr uint32_t LOG_CHECKPOINT_FREE_PER_THREAD
Per thread margin for the free space in the log, before a new query step which modifies the database,...
Definition: log0constants.h:380
constexpr ulong INNODB_LOG_WRITER_TIMEOUT_DEFAULT
Default value of innodb_log_writer_timeout (in microseconds).
Definition: log0constants.h:428
constexpr os_offset_t LOG_CHECKPOINT_2
Second checkpoint field in the header of the first log file.
Definition: log0constants.h:173
constexpr ulong INNODB_LOG_FLUSHER_SPIN_DELAY_DEFAULT
Default value of innodb_log_flusher_spin_delay (in spin rounds).
Definition: log0constants.h:466
constexpr ulong INNODB_LOG_RECENT_WRITTEN_SIZE_MAX
Maximum allowed value of innodb_log_recent_written_size.
Definition: log0constants.h:500
constexpr ulong INNODB_LOG_RECENT_CLOSED_SIZE_MAX
Maximum allowed value of innodb_log_recent_closed_size.
Definition: log0constants.h:509
constexpr ulong INNODB_LOG_BUFFER_SIZE_MIN
Minimum allowed value of innodb_log_buffer_size.
Definition: log0constants.h:488
size_t Log_file_id
Log file id (0 for ib_redo0)
Definition: log0types.h:66
uint64_t sn_t
Type used for sn values, which enumerate bytes of data stored in the log.
Definition: log0types.h:86
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
constexpr size_t INNODB_KERNEL_PAGE_SIZE_DEFAULT
Default kernel page size (not assuming huge pages support).
Definition: ut0cpu_cache.h:45
The interface to the operating system file io.
constexpr uint32_t OS_FILE_LOG_BLOCK_SIZE
The next value should be smaller or equal to the smallest sector size used on any disk.
Definition: os0file.h:196
uint64_t os_offset_t
File offset in bytes.
Definition: os0file.h:87
constexpr uint32_t UNIV_PAGE_SIZE_DEF
Default page size for InnoDB tablespaces.
Definition: univ.i:325
unsigned long int ulint
Definition: univ.i:406
constexpr size_t UNIV_PAGE_SIZE_MAX
Maximum page size InnoDB currently supports.
Definition: univ.i:323