MySQL 9.0.0
Source Code Documentation
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"

Functions

static upd_tupd_create (ulint n, mem_heap_t *heap)
 Creates an update vector object. More...
 
static 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...
 
static upd_field_tupd_get_nth_field (const upd_t *update, ulint n)
 Returns the nth field of an update vector. More...
 
static void upd_field_set_field_no (upd_field_t *upd_field, ulint field_no, const dict_index_t *index)
 
static void upd_field_set_v_field_no (upd_field_t *upd_field, ulint field_no, const dict_index_t *index)
 set field number to a update vector field, marks this field is updated. More...
 
static const upd_field_tupd_get_field_by_field_no (const upd_t *update, ulint no, bool is_virtual)
 
static 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()

static 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 
)
inlinestatic

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

Parameters
recin/out: record
page_zipin/out: compressed page whose uncompressed part will be updated, or NULL
indexin: clustered index
offsetsin: rec_get_offsets(rec, index)
trxin: transaction
roll_ptrin: roll ptr of the undo log record, can be 0 during IMPORT

◆ upd_create()

static upd_t * upd_create ( ulint  n,
mem_heap_t heap 
)
inlinestatic

Creates an update vector object.

Returns
own: update vector object
Parameters
nin: number of fields
heapin: heap from which memory allocated

◆ upd_field_set_field_no()

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

◆ upd_field_set_v_field_no()

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

set field number to a update vector field, marks this field is updated.

Parameters
[in,out]upd_fieldupdate vector field
[in]field_novirtual column sequence num
[in]indexindex

◆ upd_get_field_by_field_no()

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

◆ upd_get_n_fields()

static ulint upd_get_n_fields ( const upd_t update)
inlinestatic

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

Returns
number of fields
Parameters
updatein: update vector

◆ upd_get_nth_field()

static upd_field_t * upd_get_nth_field ( const upd_t update,
ulint  n 
)
inlinestatic

Returns the nth field of an update vector.

Returns
update vector field
Parameters
updatein: update vector
nin: field position in update vector