MySQL 9.4.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
row0upd.ic File Reference

Update of a row. More...

#include "mtr0log.h"
#include "lock0lock.h"
#include "row0row.h"
#include "trx0trx.h"
#include "trx0undo.h"
#include "page0zip.h"

Classes

class  upd_get_nth_field_t_impl
 

Functions

upd_tupd_create (ulint n, mem_heap_t *heap)
 Creates an update vector object. More...
 
ulint upd_get_n_fields (const upd_t *update)
 Returns the number of fields in the update vector == number of columns to be updated by an update vector. More...
 
void upd_field_set_field_no (upd_field_t *upd_field, ulint field_no, const dict_index_t *index)
 Set which index field is updated by an update vector field. More...
 
void upd_field_set_v_field_no (upd_field_t *upd_field, ulint field_no, const dict_index_t *index)
 Set for which virtual column the value is updated by an update vector field. More...
 
const upd_field_tupd_get_field_by_field_no (const upd_t *update, ulint no, bool is_virtual)
 Returns a field of an update vector by field_no. More...
 
void row_upd_rec_sys_fields (rec_t *rec, page_zip_des_t *page_zip, const dict_index_t *index, const ulint *offsets, const trx_t *trx, roll_ptr_t roll_ptr)
 Updates the trx id and roll ptr field in a clustered index record when a row is updated or marked deleted. More...
 

Detailed Description

Update of a row.

Created 12/27/1996 Heikki Tuuri

Function Documentation

◆ row_upd_rec_sys_fields()

void row_upd_rec_sys_fields ( rec_t rec,
page_zip_des_t page_zip,
const dict_index_t index,
const ulint offsets,
const trx_t trx,
roll_ptr_t  roll_ptr 
)
inline

Updates the trx id and roll ptr field in a clustered index record when a row is updated or marked deleted.

Parameters
[in,out]recrecord
[in,out]page_zipcompressed page whose uncompressed part will be updated, or NULL
[in]indexclustered index
[in]offsetsrec_get_offsets(rec, index)
[in]trxtransaction
[in]roll_ptrroll ptr of the undo log record, can be 0 during IMPORT

◆ upd_create()

upd_t * upd_create ( ulint  n,
mem_heap_t heap 
)
inline

Creates an update vector object.

Parameters
[in]nnumber of fields
[in]heapheap from which memory allocated
Returns
own: update vector object

◆ upd_field_set_field_no()

void upd_field_set_field_no ( upd_field_t upd_field,
ulint  field_no,
const dict_index_t index 
)
inline

Set which index field is updated by an update vector field.

Parameters
[in]upd_fieldupdate vector field
[in]field_nofield position in index
[in]indexindex

◆ upd_field_set_v_field_no()

void upd_field_set_v_field_no ( upd_field_t upd_field,
ulint  field_no,
const dict_index_t index 
)
inline

Set for which virtual column the value is updated by an update vector field.

Parameters
[in,out]upd_fieldupdate vector field
[in]field_novirtual column number in table
[in]indexindex

◆ upd_get_field_by_field_no()

const upd_field_t * upd_get_field_by_field_no ( const upd_t update,
ulint  no,
bool  is_virtual 
)
inline

Returns a field of an update vector by field_no.

Parameters
[in]updateUpdate vector.
[in]no"Field number" as stored in the update vector: when is_virtual is false the position of the field in the updated index, otherwise the column number of the virtual field in table.
See also
upd_field::field_no
Parameters
[in]is_virtualIf it is a virtual column.
Returns
update vector field, or nullptr.

◆ upd_get_n_fields()

ulint upd_get_n_fields ( const upd_t update)
inline

Returns the number of fields in the update vector == number of columns to be updated by an update vector.

Parameters
[in]updateupdate vector
Returns
number of fields