334
334
btr_cur_del_mark_set_clust_rec(
335
335
/*===========================*/
336
336
ulint flags, /*!< in: undo logging and locking flags */
337
btr_cur_t* cursor, /*!< in: cursor */
337
buf_block_t* block, /*!< in/out: buffer block of the record */
338
rec_t* rec, /*!< in/out: record */
339
dict_index_t* index, /*!< in: clustered index of the record */
340
const ulint* offsets,/*!< in: rec_get_offsets(rec) */
338
341
ibool val, /*!< in: value to set */
339
342
que_thr_t* thr, /*!< in: query thread */
340
mtr_t* mtr); /*!< in: mtr */
343
mtr_t* mtr) /*!< in: mtr */
344
__attribute__((nonnull));
341
345
/***********************************************************//**
342
346
Sets a secondary index record delete mark to TRUE or FALSE.
343
347
@return DB_SUCCESS, DB_LOCK_WAIT, or error number */
463
467
/*******************************************************************//**
464
468
Estimates the number of different key values in a given index, for
465
469
each n-column prefix of the index where n <= dict_index_get_n_unique(index).
466
The estimates are stored in the array index->stat_n_diff_key_vals. */
470
The estimates are stored in the array index->stat_n_diff_key_vals.
471
If innodb_stats_method is nulls_ignored, we also record the number of
472
non-null values for each prefix and stored the estimates in
473
array index->stat_n_non_null_key_vals. */
469
476
btr_estimate_number_of_different_key_vals(
470
477
/*======================================*/
471
478
dict_index_t* index); /*!< in: index */
472
479
/*******************************************************************//**
473
Marks not updated extern fields as not-owned by this record. The ownership
474
is transferred to the updated record which is inserted elsewhere in the
480
Marks non-updated off-page fields as disowned by this record. The ownership
481
must be transferred to the updated record which is inserted elsewhere in the
475
482
index tree. In purge only the owner of externally stored field is allowed
477
@return TRUE if BLOB ownership was transferred */
483
to free the field. */
480
btr_cur_mark_extern_inherited_fields(
481
/*=================================*/
486
btr_cur_disown_inherited_fields(
487
/*============================*/
482
488
page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed
483
489
part will be updated, or NULL */
484
490
rec_t* rec, /*!< in/out: record in a clustered index */
485
491
dict_index_t* index, /*!< in: index of the page */
486
492
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
487
493
const upd_t* update, /*!< in: update vector */
488
mtr_t* mtr); /*!< in: mtr, or NULL if not logged */
489
/*******************************************************************//**
490
The complement of the previous function: in an update entry may inherit
491
some externally stored fields from a record. We must mark them as inherited
492
in entry, so that they are not freed in a rollback. */
495
btr_cur_mark_dtuple_inherited_extern(
496
/*=================================*/
497
dtuple_t* entry, /*!< in/out: updated entry to be
498
inserted to clustered index */
499
const upd_t* update); /*!< in: update vector */
500
/*******************************************************************//**
501
Marks all extern fields in a dtuple as owned by the record. */
504
btr_cur_unmark_dtuple_extern_fields(
505
/*================================*/
506
dtuple_t* entry); /*!< in/out: clustered index entry */
494
mtr_t* mtr) /*!< in/out: mini-transaction */
495
__attribute__((nonnull(2,3,4,5,6)));
507
496
/*******************************************************************//**
508
497
Stores the fields in big_rec_vec to the tablespace and puts pointers to
509
498
them in rec. The extern flags in rec will have to be set beforehand.
522
511
the "external storage" flags in offsets
523
512
will not correspond to rec when
524
513
this function returns */
525
big_rec_t* big_rec_vec, /*!< in: vector containing fields
515
mtr_t* local_mtr, /*!< in: mtr containing the
516
latch to rec and to the tree */
517
#endif /* UNIV_DEBUG */
518
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
519
ibool update_in_place,/*! in: TRUE if the record is updated
520
in place (not delete+insert) */
521
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
522
const big_rec_t*big_rec_vec) /*!< in: vector containing fields
526
523
to be stored externally */
527
mtr_t* local_mtr); /*!< in: mtr containing the latch to
528
rec and to the tree */
524
__attribute__((nonnull));
526
/** Stores the fields in big_rec_vec to the tablespace and puts pointers to
527
them in rec. The extern flags in rec will have to be set beforehand.
528
The fields are stored on pages allocated from leaf node
529
file segment of the index tree.
530
@param index in: clustered index; MUST be X-latched by mtr
531
@param b in/out: block containing rec; MUST be X-latched by mtr
532
@param rec in/out: clustered index record
533
@param offsets in: rec_get_offsets(rec, index);
534
the "external storage" flags in offsets will not be adjusted
535
@param mtr in: mini-transaction that holds x-latch on index and b
536
@param upd in: TRUE if the record is updated in place (not delete+insert)
537
@param big in: vector containing fields to be stored externally
538
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
540
# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
541
btr_store_big_rec_extern_fields_func(index,b,rec,offsets,mtr,upd,big)
542
#elif defined UNIV_BLOB_LIGHT_DEBUG
543
# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
544
btr_store_big_rec_extern_fields_func(index,b,rec,offsets,upd,big)
546
# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \
547
btr_store_big_rec_extern_fields_func(index,b,rec,offsets,big)
529
550
/*******************************************************************//**
530
551
Frees the space in an externally stored field to the file space
531
552
management if the field in data is owned the externally stored field,