MySQL 8.0.40
Source Code Documentation
lob::ReadContext Struct Reference

The context information for reading a single BLOB. More...

#include <lob0lob.h>

Public Member Functions

 ReadContext (const page_size_t &page_size, const byte *data, ulint prefix_len, byte *buf, ulint len, bool is_sdi)
 Constructor. More...
 
void read_blobref ()
 Read the space_id, page_no and offset information from the BLOB reference object and update the member variables. More...
 
bool is_valid_blob () const
 Check if the BLOB reference is valid. More...
 
dict_index_tindex ()
 
bool is_sdi () const
 Is it a space dictionary index (SDI)? More...
 
bool assert_read_uncommitted () const
 Assert that current trx is using isolation level read uncommitted. More...
 

Public Attributes

const page_size_tm_page_size
 The page size information. More...
 
const bytem_data
 The 'internally' stored part of the field containing also the reference to the external part; must be protected by a lock or a page latch. More...
 
ulint m_local_len
 Length (in bytes) of BLOB prefix stored inline in clustered index record. More...
 
const ref_t m_blobref
 The blob reference of the blob that is being read. More...
 
bytem_buf
 Buffer into which data is read. More...
 
ulint m_len
 Length of the buffer m_buf. More...
 
space_id_t m_space_id
 The identifier of the space in which blob is available. More...
 
page_no_t m_page_no
 The page number obtained from the blob reference. More...
 
ulint m_offset
 The offset information obtained from the blob reference. More...
 
dict_index_tm_index
 
ulint m_lob_version
 
const bool m_is_sdi
 Is it a tablespace dictionary index (SDI)? More...
 
trx_tm_trx = nullptr
 The transaction that is reading. More...
 

Detailed Description

The context information for reading a single BLOB.

Constructor & Destructor Documentation

◆ ReadContext()

lob::ReadContext::ReadContext ( const page_size_t page_size,
const byte data,
ulint  prefix_len,
byte buf,
ulint  len,
bool  is_sdi 
)
inline

Constructor.

Parameters
[in]page_sizepage size information.
[in]data'internally' stored part of the field containing also the reference to the external part; must be protected by a lock or a page latch.
[in]prefix_lenlength of BLOB data stored inline in the clustered index record, including the blob reference.
[out]bufthe output buffer.
[in]lenthe output buffer length.
[in]is_sditrue for SDI Indexes.

Member Function Documentation

◆ assert_read_uncommitted()

bool lob::ReadContext::assert_read_uncommitted ( ) const

Assert that current trx is using isolation level read uncommitted.

Returns
true if transaction is using read uncommitted, false otherwise.

◆ index()

dict_index_t * lob::ReadContext::index ( )
inline

◆ is_sdi()

bool lob::ReadContext::is_sdi ( ) const
inline

Is it a space dictionary index (SDI)?

Returns
true if SDI, false otherwise.

◆ is_valid_blob()

bool lob::ReadContext::is_valid_blob ( ) const
inline

Check if the BLOB reference is valid.

For this particular check, if the length of the BLOB is greater than 0, it is considered valid.

Returns
true if valid.

◆ read_blobref()

void lob::ReadContext::read_blobref ( )
inline

Read the space_id, page_no and offset information from the BLOB reference object and update the member variables.

Member Data Documentation

◆ m_blobref

const ref_t lob::ReadContext::m_blobref

The blob reference of the blob that is being read.

◆ m_buf

byte* lob::ReadContext::m_buf

Buffer into which data is read.

◆ m_data

const byte* lob::ReadContext::m_data

The 'internally' stored part of the field containing also the reference to the external part; must be protected by a lock or a page latch.

◆ m_index

dict_index_t* lob::ReadContext::m_index

◆ m_is_sdi

const bool lob::ReadContext::m_is_sdi

Is it a tablespace dictionary index (SDI)?

◆ m_len

ulint lob::ReadContext::m_len

Length of the buffer m_buf.

◆ m_lob_version

ulint lob::ReadContext::m_lob_version

◆ m_local_len

ulint lob::ReadContext::m_local_len

Length (in bytes) of BLOB prefix stored inline in clustered index record.

◆ m_offset

ulint lob::ReadContext::m_offset

The offset information obtained from the blob reference.

◆ m_page_no

page_no_t lob::ReadContext::m_page_no

The page number obtained from the blob reference.

◆ m_page_size

const page_size_t& lob::ReadContext::m_page_size

The page size information.

◆ m_space_id

space_id_t lob::ReadContext::m_space_id

The identifier of the space in which blob is available.

◆ m_trx

trx_t* lob::ReadContext::m_trx = nullptr

The transaction that is reading.


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