MySQL 26.7.0
Source Code Documentation
buf0flu.ic File Reference

The database buffer pool flush algorithm. More...

#include "buf0buf.h"
#include "fsp0types.h"
#include "mtr0mtr.h"
#include "srv0srv.h"

Functions

void buf_flush_insert_into_flush_list (buf_pool_t *buf_pool, buf_block_t *block)
 Inserts a modified block into the flush list. More...
 
void buf_flush_note_oldest_modification (buf_pool_t *buf_pool, buf_block_t *block, lsn_t start_lsn)
 As part of buf_flush_note_modification() we are noting the oldest modification for the block. More...
 
static void buf_flush_note_modification (buf_block_t *block, lsn_t start_lsn, lsn_t end_lsn, Flush_observer *observer)
 This function should be called at a mini-transaction commit, if a page was modified in it. More...
 

Detailed Description

The database buffer pool flush algorithm.

Created 11/5/1995 Heikki Tuuri

Function Documentation

◆ buf_flush_insert_into_flush_list()

void buf_flush_insert_into_flush_list ( buf_pool_t buf_pool,
buf_block_t block 
)

Inserts a modified block into the flush list.

Parameters
[in]buf_poolbuffer pool instance
[in,out]blockblock which is modified

◆ buf_flush_note_modification()

static void buf_flush_note_modification ( buf_block_t block,
lsn_t  start_lsn,
lsn_t  end_lsn,
Flush_observer observer 
)
inlinestatic

This function should be called at a mini-transaction commit, if a page was modified in it.

Puts the block to the list of modified blocks, if it is not already in it.

Parameters
blockin: block which is modified
start_lsnin: start lsn of the mtr that modified this block
end_lsnin: end lsn of the mtr that modified this block
observerin: flush observer

◆ buf_flush_note_oldest_modification()

void buf_flush_note_oldest_modification ( buf_pool_t buf_pool,
buf_block_t block,
lsn_t  start_lsn 
)

As part of buf_flush_note_modification() we are noting the oldest modification for the block.

If it already has one, it will not be changed.

Parameters
[in]buf_poolbuffer pool instance
[in]blockblock which is modified
[in]start_lsnstart lsn of the mtr that modified this block, it will become the oldest modification if it is non-zero