mariadb/innobase/include/row0upd.ic
unknown c67510f093 srv0srv.h Support raw disk partitions as data files
srv0start.c	Support raw disk partitions as data files
srv0srv.c	Support raw disk partitions as data files
row0purge.c	< 4 GB rows, doublewrite, hang fixes
row0row.c	< 4 GB rows, doublewrite, hang fixes
row0sel.c	< 4 GB rows, doublewrite, hang fixes
row0uins.c	< 4 GB rows, doublewrite, hang fixes
row0umod.c	< 4 GB rows, doublewrite, hang fixes
row0undo.c	< 4 GB rows, doublewrite, hang fixes
row0upd.c	< 4 GB rows, doublewrite, hang fixes
srv0srv.c	< 4 GB rows, doublewrite, hang fixes
srv0start.c	< 4 GB rows, doublewrite, hang fixes
sync0rw.c	< 4 GB rows, doublewrite, hang fixes
sync0sync.c	< 4 GB rows, doublewrite, hang fixes
trx0purge.c	< 4 GB rows, doublewrite, hang fixes
trx0rec.c	< 4 GB rows, doublewrite, hang fixes
trx0sys.c	< 4 GB rows, doublewrite, hang fixes
btr0btr.c	< 4 GB rows, doublewrite, hang fixes
btr0cur.c	< 4 GB rows, doublewrite, hang fixes
buf0buf.c	< 4 GB rows, doublewrite, hang fixes
buf0flu.c	< 4 GB rows, doublewrite, hang fixes
buf0rea.c	< 4 GB rows, doublewrite, hang fixes
data0data.c	< 4 GB rows, doublewrite, hang fixes
fil0fil.c	< 4 GB rows, doublewrite, hang fixes
fsp0fsp.c	< 4 GB rows, doublewrite, hang fixes
ibuf0ibuf.c	< 4 GB rows, doublewrite, hang fixes
lock0lock.c	< 4 GB rows, doublewrite, hang fixes
log0log.c	< 4 GB rows, doublewrite, hang fixes
log0recv.c	< 4 GB rows, doublewrite, hang fixes
os0file.c	< 4 GB rows, doublewrite, hang fixes
page0cur.c	< 4 GB rows, doublewrite, hang fixes
pars0pars.c	< 4 GB rows, doublewrite, hang fixes
rem0cmp.c	< 4 GB rows, doublewrite, hang fixes
rem0rec.c	< 4 GB rows, doublewrite, hang fixes
row0ins.c	< 4 GB rows, doublewrite, hang fixes
row0mysql.c	< 4 GB rows, doublewrite, hang fixes
univ.i  	< 4 GB rows, doublewrite, hang fixes
data0data.ic	< 4 GB rows, doublewrite, hang fixes
mach0data.ic	< 4 GB rows, doublewrite, hang fixes
rem0rec.ic	< 4 GB rows, doublewrite, hang fixes
row0upd.ic	< 4 GB rows, doublewrite, hang fixes
trx0rec.ic	< 4 GB rows, doublewrite, hang fixes
rem0cmp.h	< 4 GB rows, doublewrite, hang fixes
rem0rec.h	< 4 GB rows, doublewrite, hang fixes
row0ins.h	< 4 GB rows, doublewrite, hang fixes
row0mysql.h	< 4 GB rows, doublewrite, hang fixes
row0row.h	< 4 GB rows, doublewrite, hang fixes
row0upd.h	< 4 GB rows, doublewrite, hang fixes
srv0srv.h	< 4 GB rows, doublewrite, hang fixes
sync0sync.h	< 4 GB rows, doublewrite, hang fixes
trx0rec.h	< 4 GB rows, doublewrite, hang fixes
trx0sys.h	< 4 GB rows, doublewrite, hang fixes
trx0types.h	< 4 GB rows, doublewrite, hang fixes
trx0undo.h	< 4 GB rows, doublewrite, hang fixes
ut0dbg.h	< 4 GB rows, doublewrite, hang fixes
ut0ut.h 	< 4 GB rows, doublewrite, hang fixes
btr0btr.h	< 4 GB rows, doublewrite, hang fixes
btr0cur.h	< 4 GB rows, doublewrite, hang fixes
buf0buf.h	< 4 GB rows, doublewrite, hang fixes
buf0flu.h	< 4 GB rows, doublewrite, hang fixes
data0data.h	< 4 GB rows, doublewrite, hang fixes
dict0mem.h	< 4 GB rows, doublewrite, hang fixes
fil0fil.h	< 4 GB rows, doublewrite, hang fixes
fsp0fsp.h	< 4 GB rows, doublewrite, hang fixes
os0file.h	< 4 GB rows, doublewrite, hang fixes


innobase/include/btr0btr.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/btr0cur.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/buf0buf.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/buf0flu.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/dict0mem.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/fil0fil.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/fsp0fsp.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/os0file.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/rem0cmp.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/row0ins.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/row0mysql.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/row0row.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/sync0sync.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/trx0sys.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/trx0types.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/trx0undo.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/ut0dbg.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/ut0ut.h:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/data0data.ic:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/mach0data.ic:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/rem0rec.ic:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/row0upd.ic:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/trx0rec.ic:
  < 4 GB rows, doublewrite, hang fixes
innobase/include/univ.i:
  < 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0btr.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/btr/btr0cur.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0buf.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0flu.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/buf/buf0rea.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/data/data0data.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/fil/fil0fil.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/fsp/fsp0fsp.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/ibuf/ibuf0ibuf.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/lock/lock0lock.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/log/log0log.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/log/log0recv.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/os/os0file.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/page/page0cur.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/pars/pars0pars.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0cmp.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/rem/rem0rec.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0ins.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0mysql.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0purge.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0row.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0sel.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0uins.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0umod.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0undo.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/row/row0upd.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0rw.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/sync/sync0sync.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0purge.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0rec.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/trx/trx0sys.c:
  < 4 GB rows, doublewrite, hang fixes
innobase/srv/srv0srv.c:
  Support raw disk partitions as data files
innobase/srv/srv0start.c:
  Support raw disk partitions as data files
innobase/include/srv0srv.h:
  Support raw disk partitions as data files
2001-08-04 19:36:14 +03:00

110 lines
2.8 KiB
Text

/******************************************************
Update of a row
(c) 1996 Innobase Oy
Created 12/27/1996 Heikki Tuuri
*******************************************************/
#include "mtr0log.h"
#include "trx0trx.h"
#include "trx0undo.h"
#include "row0row.h"
#include "btr0sea.h"
/*************************************************************************
Creates an update vector object. */
UNIV_INLINE
upd_t*
upd_create(
/*=======*/
/* out, own: update vector object */
ulint n, /* in: number of fields */
mem_heap_t* heap) /* in: heap from which memory allocated */
{
upd_t* update;
ulint i;
update = mem_heap_alloc(heap, sizeof(upd_t));
update->info_bits = 0;
update->n_fields = n;
update->fields = mem_heap_alloc(heap, sizeof(upd_field_t) * n);
for (i = 0; i < n; i++) {
update->fields[i].extern_storage = 0;
}
return(update);
}
/*************************************************************************
Returns the number of fields in the update vector == number of columns
to be updated by an update vector. */
UNIV_INLINE
ulint
upd_get_n_fields(
/*=============*/
/* out: number of fields */
upd_t* update) /* in: update vector */
{
ut_ad(update);
return(update->n_fields);
}
/*************************************************************************
Returns the nth field of an update vector. */
UNIV_INLINE
upd_field_t*
upd_get_nth_field(
/*==============*/
/* out: update vector field */
upd_t* update, /* in: update vector */
ulint n) /* in: field position in update vector */
{
ut_ad(update);
ut_ad(n < update->n_fields);
return(update->fields + n);
}
/*************************************************************************
Sets the clustered index field number to be updated by an update vector
field. */
UNIV_INLINE
void
upd_field_set_field_no(
/*===================*/
upd_field_t* upd_field, /* in: update vector field */
ulint field_no, /* in: field number in a clustered
index */
dict_index_t* index) /* in: clustered index */
{
ut_ad(index->type & DICT_CLUSTERED);
upd_field->field_no = field_no;
dtype_copy(dfield_get_type(&(upd_field->new_val)),
dict_index_get_nth_type(index, field_no));
}
/*************************************************************************
Updates the trx id and roll ptr field in a clustered index record when
a row is updated or marked deleted. */
UNIV_INLINE
void
row_upd_rec_sys_fields(
/*===================*/
rec_t* rec, /* in: record */
dict_index_t* index, /* in: clustered index */
trx_t* trx, /* in: transaction */
dulint roll_ptr)/* in: roll ptr of the undo log record */
{
ut_ad(index->type & DICT_CLUSTERED);
ut_ad(!buf_block_align(rec)->is_hashed
|| rw_lock_own(&btr_search_latch, RW_LOCK_EX));
row_set_rec_trx_id(rec, index, trx->id);
row_set_rec_roll_ptr(rec, index, roll_ptr);
}