MySQL 8.1.0
Source Code Documentation
lob::DeleteContext Struct Reference

The context information when the delete operation on LOB is taking place. More...

#include <lob0lob.h>

Inheritance diagram for lob::DeleteContext:
[legend]

Public Member Functions

 DeleteContext (const BtrContext &btr, byte *field_ref, ulint field_no, bool rollback)
 Constructor. More...
 
 DeleteContext (const BtrContext &btr, bool rollback)
 Constructor. More...
 
void set_blob (byte *field_ref, ulint field_no)
 Update the delete context to point to a different blob. More...
 
bool is_ref_valid () const
 Check if the blob reference is valid. More...
 
bool is_compressed () const
 Determine if it is compressed page format. More...
 
bool has_atomic_blobs () const
 Check if tablespace supports atomic blobs. More...
 
bool is_delete_marked () const
 
bool validate_blobref () const
 Validate the LOB reference object. More...
 
void x_latch_rec_page (mtr_t *mtr)
 Acquire an x-latch on the index page containing the clustered index record, in the given mini-transaction context. More...
 
void add_lob_block (buf_block_t *block)
 Add a buffer block that is to be freed. More...
 
void free_lob_blocks ()
 Free all the stored lob blocks. More...
 
 ~DeleteContext ()
 Destructor. More...
 
- Public Member Functions inherited from lob::BtrContext
 BtrContext ()
 Default Constructor. More...
 
 BtrContext (mtr_t *mtr, dict_index_t *index, buf_block_t *block)
 Constructor. More...
 
 BtrContext (mtr_t *mtr, btr_pcur_t *pcur, dict_index_t *index, rec_t *rec, ulint *offsets, buf_block_t *block)
 Constructor. More...
 
 BtrContext (mtr_t *mtr, btr_pcur_t *pcur, dict_index_t *index, rec_t *rec, ulint *offsets, buf_block_t *block, opcode op)
 Constructor. More...
 
 BtrContext (const BtrContext &other)
 Copy Constructor. More...
 
void disown_inherited_fields (const upd_t *update)
 Marks non-updated off-page fields as disowned by this record. More...
 
void set_ownership_of_extern_field (ulint i, bool val)
 Sets the ownership bit of an externally stored field in a record. More...
 
void unmark_extern_fields ()
 Marks all extern fields in a record as owned by the record. More...
 
void free_externally_stored_fields (trx_id_t trx_id, undo_no_t undo_no, bool rollback, ulint rec_type, purge_node_t *node)
 Frees the externally stored fields for a record. More...
 
void free_updated_extern_fields (trx_id_t trx_id, undo_no_t undo_no, const upd_t *update, bool rollback, big_rec_t *big_rec_vec)
 Frees the externally stored fields for a record, if the field is mentioned in the update vector. More...
 
page_zip_des_tget_page_zip () const
 Gets the compressed page descriptor. More...
 
page_no_t get_page_no () const
 Get the page number of clustered index block. More...
 
ulint get_rec_offset () const
 Get the record offset within page of the clustered index record. More...
 
bool need_recalc () const
 Check if there is a need to recalculate the context information. More...
 
rec_trec () const
 Get the clustered index record pointer. More...
 
byteget_field_ref (ulint field_no) const
 Get the LOB reference for the given field number. More...
 
bool validate () const
 Validate the current BLOB context object. More...
 
bool are_all_blobrefs_valid () const
 Check to see if all pointers to externally stored columns in the record must be valid. More...
 
bool is_bulk () const
 Determine whether current operation is a bulk insert operation. More...
 
const page_trec_frame () const
 Get the beginning of the B-tree clustered index page frame that contains the current clustered index record (m_rec). More...
 
void commit_btr_mtr ()
 Commit the mini-transaction that is holding the latches of the clustered index record block. More...
 
void start_btr_mtr ()
 Start the mini-transaction that will be holding the latches of the clustered index record block. More...
 
page_no_t get_btr_page_no () const
 Get the page number of clustered index record. More...
 
void rec_block_fix ()
 Increment the buffer fix count of the clustered index record block. More...
 
void rec_block_unfix ()
 Decrement the buffer fix count of the clustered index record block, X-latching it before, so that the overall buffer_fix_count doesn't change. More...
 
void restore_position ()
 Restore the position of the persistent cursor. More...
 
dict_index_tindex () const
 Get the index object. More...
 
dict_table_ttable () const
 Get the table object. More...
 
space_id_t space () const
 Get the space id. More...
 
const page_size_t page_size () const
 Obtain the page size of the underlying table. More...
 
page_no_t pages_in_extent () const
 Determine the extent size (in pages) for the underlying table. More...
 
void check_redolog ()
 Check if there is enough space in the redo log file. More...
 
void make_nth_extern (ulint field_no)
 Mark the nth field as externally stored. More...
 
mtr_log_t get_log_mode ()
 Get the log mode of the btr mtr. More...
 
Flush_observerget_flush_observer () const
 Get flush observer. More...
 
ulintget_offsets () const
 Get the record offsets array. More...
 
bool rec_offs_validate () const
 Validate the record offsets array. More...
 
mtr_tget_mtr ()
 Get the associated mini-transaction. More...
 
buf_block_tblock () const
 Get the pointer to the clustered record block. More...
 
void store_position ()
 Save the position of the persistent cursor. More...
 
void check_redolog_normal ()
 Check if there is enough space in log file. More...
 
void check_redolog_bulk ()
 When bulk load is being done, check if there is enough space in redo log file. More...
 
void recalc ()
 Recalculate some of the members after restoring the persistent cursor. More...
 
void zblob_write_blobref (ulint field_no, mtr_t *mtr)
 Write a blob reference of a field into a clustered index record in a compressed leaf page. More...
 

Public Attributes

ref_t m_blobref
 the BLOB reference or external field reference. More...
 
ulint m_field_no
 field number of externally stored column; ignored if rec == NULL More...
 
bool m_rollback
 Is this operation part of rollback? More...
 
page_size_t m_page_size
 The page size of the tablespace. More...
 
- Public Attributes inherited from lob::BtrContext
mtr_tm_mtr
 The btr mtr that is holding the latch on the B-tree index page containing the clustered index record. More...
 
btr_pcur_tm_pcur
 Persistent cursor positioned on the clustered index record. More...
 
dict_index_tm_index
 
rec_tm_rec
 
ulintm_offsets
 
buf_block_tm_block
 
opcode m_op
 
ulint m_rec_offset
 Record offset within the page. More...
 
page_no_t m_btr_page_no
 Page number where the clust rec is present. More...
 

Private Types

using Block_vector = std::vector< buf_block_t *, ut::allocator< buf_block_t * > >
 

Private Member Functions

page_size_t get_page_size () const
 Obtain the page size from the tablespace flags. More...
 

Private Attributes

ref_mem_t m_blobref_mem
 Memory copy of the original LOB reference. More...
 
Block_vector m_lob_blocks
 The buffer blocks of lob to be freed. More...
 

Detailed Description

The context information when the delete operation on LOB is taking place.

Member Typedef Documentation

◆ Block_vector

Constructor & Destructor Documentation

◆ DeleteContext() [1/2]

lob::DeleteContext::DeleteContext ( const BtrContext btr,
byte field_ref,
ulint  field_no,
bool  rollback 
)
inline

Constructor.

Parameters
[in]btrthe B-tree context of the blob operation.
[in]field_refreference to a blob
[in]field_nofield containing the blob.
[in]rollbacktrue if it is rollback, false if it is purge.

◆ DeleteContext() [2/2]

lob::DeleteContext::DeleteContext ( const BtrContext btr,
bool  rollback 
)
inline

Constructor.

Parameters
[in]btrthe B-tree context of the blob operation.
[in]rollbacktrue if it is rollback, false if it is purge.

◆ ~DeleteContext()

lob::DeleteContext::~DeleteContext ( )
inline

Destructor.

Just add some asserts to ensure that resources are freed.

Member Function Documentation

◆ add_lob_block()

void lob::DeleteContext::add_lob_block ( buf_block_t block)
inline

Add a buffer block that is to be freed.

Parameters
[in]blockbuffer block to be freed.

◆ free_lob_blocks()

void lob::DeleteContext::free_lob_blocks ( )
inline

Free all the stored lob blocks.

◆ get_page_size()

page_size_t lob::DeleteContext::get_page_size ( ) const
inlineprivate

Obtain the page size from the tablespace flags.

Returns
the page size.

◆ has_atomic_blobs()

bool lob::DeleteContext::has_atomic_blobs ( ) const
inline

Check if tablespace supports atomic blobs.

Returns
true if tablespace has atomic blobs.

◆ is_compressed()

bool lob::DeleteContext::is_compressed ( ) const
inline

Determine if it is compressed page format.

Returns
true if compressed.

◆ is_delete_marked()

bool lob::DeleteContext::is_delete_marked ( ) const
inline

◆ is_ref_valid()

bool lob::DeleteContext::is_ref_valid ( ) const
inline

Check if the blob reference is valid.

Returns
true if valid, false otherwise.

◆ set_blob()

void lob::DeleteContext::set_blob ( byte field_ref,
ulint  field_no 
)
inline

Update the delete context to point to a different blob.

Parameters
[in]field_refblob reference
[in]field_nothe field that contains the blob.

◆ validate_blobref()

bool lob::DeleteContext::validate_blobref ( ) const
inline

Validate the LOB reference object.

Returns
true if valid, false otherwise.

◆ x_latch_rec_page()

void lob::DeleteContext::x_latch_rec_page ( mtr_t mtr)

Acquire an x-latch on the index page containing the clustered index record, in the given mini-transaction context.

Parameters
[in]mtrMini-transaction context.

Member Data Documentation

◆ m_blobref

ref_t lob::DeleteContext::m_blobref

the BLOB reference or external field reference.

◆ m_blobref_mem

ref_mem_t lob::DeleteContext::m_blobref_mem
private

Memory copy of the original LOB reference.

◆ m_field_no

ulint lob::DeleteContext::m_field_no

field number of externally stored column; ignored if rec == NULL

◆ m_lob_blocks

Block_vector lob::DeleteContext::m_lob_blocks
private

The buffer blocks of lob to be freed.

◆ m_page_size

page_size_t lob::DeleteContext::m_page_size

The page size of the tablespace.

◆ m_rollback

bool lob::DeleteContext::m_rollback

Is this operation part of rollback?


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