MySQL 9.1.0
Source Code Documentation
mtr0mtr.cc File Reference

Mini-transaction buffer. More...

#include "mtr0mtr.h"
#include "buf0buf.h"
#include "buf0flu.h"
#include "clone0api.h"
#include "fsp0sysspace.h"
#include "log0meb.h"
#include "clone0clone.h"
#include "log0buf.h"
#include "log0chkp.h"
#include "log0recv.h"
#include "log0test.h"
#include "log0write.h"
#include "mtr0log.h"
#include "my_dbug.h"
#include "page0types.h"
#include "trx0purge.h"

Classes

struct  Iterate< Functor >
 Iterate over a memo block in reverse. More...
 
struct  Find
 Find specific object. More...
 
struct  Find_page
 Find a page frame. More...
 
struct  Mtr_memo_print
 
struct  Mtr_memo_contains
 
struct  Release_all
 Release the latches and blocks acquired by the mini-transaction. More...
 
struct  Debug_check
 Check that all slots have been handled. More...
 
struct  Debug_check_no_latching
 Assure that there are no slots that are latching any resources. More...
 
struct  Add_dirty_blocks_to_flush_list
 Add blocks modified by the mini-transaction to the flush list. More...
 
class  mtr_t::Command
 
struct  mtr_write_log_t
 Write the block contents to the REDO log. More...
 
struct  FlaggedCheck
 Debug check for flags. More...
 

Functions

static void memo_slot_release (mtr_memo_slot_t *slot)
 Release latches and decrement the buffer fix count. More...
 
lsn_t mtr_commit_mlog_test (size_t payload)
 Reserves space in the log buffer and writes a single MLOG_TEST. More...
 
static void mtr_commit_mlog_test_filling_block_low (log_t &log, size_t req_space_left, size_t recursive_level)
 
void mtr_commit_mlog_test_filling_block (log_t &log, size_t req_space_left)
 Reserves space in the log buffer and writes a single MLOG_TEST. More...
 

Detailed Description

Mini-transaction buffer.

Created 11/26/1995 Heikki Tuuri

Function Documentation

◆ memo_slot_release()

static void memo_slot_release ( mtr_memo_slot_t slot)
static

Release latches and decrement the buffer fix count.

Parameters
[in]slotmemo slot

◆ mtr_commit_mlog_test()

lsn_t mtr_commit_mlog_test ( size_t  payload = 0)

Reserves space in the log buffer and writes a single MLOG_TEST.

Parameters
[in]payloadnumber of extra bytes within the record, not greater than 1024
Returns
end_lsn pointing to the first byte after the written record

◆ mtr_commit_mlog_test_filling_block()

void mtr_commit_mlog_test_filling_block ( log_t log,
size_t  space_left = 0 
)

Reserves space in the log buffer and writes a single MLOG_TEST.

Adjusts size of the payload in the record, in order to fill the current block up to its boundary. If nothing else is happening in parallel, we could expect to see afterwards: (cur_lsn + space_left) % OS_FILE_LOG_BLOCK_SIZE == LOG_BLOCK_HDR_SIZE, where cur_lsn = log_get_lsn(log).

Parameters
[in,out]logredo log
[in]space_leftextra bytes left to the boundary of block, must be not greater than 496

◆ mtr_commit_mlog_test_filling_block_low()

static void mtr_commit_mlog_test_filling_block_low ( log_t log,
size_t  req_space_left,
size_t  recursive_level 
)
static