~drizzle-trunk/drizzle/7.1-staging

« back to all changes in this revision

Viewing changes to plugin/innobase/include/btr0cur.h

  • Committer: Continuous Integration
  • Date: 2012-05-24 06:47:13 UTC
  • mfrom: (2549.1.5 7.1)
  • Revision ID: ci@drizzle.org-20120524064713-xg2jthrq5fy8rkct
removed:
  plugin/innobase/include/thr0loc.h
  plugin/innobase/include/thr0loc.ic
  plugin/innobase/thr/thr0loc.cc
added:
  plugin/innobase/include/ut0bh.h
  plugin/innobase/include/ut0bh.ic
  plugin/innobase/ut/ut0bh.cc
modified:
  plugin/innobase/CMakeLists.txt
  plugin/innobase/btr/btr0btr.cc
  plugin/innobase/btr/btr0cur.cc
  plugin/innobase/btr/btr0sea.cc
  plugin/innobase/buf/buf0buddy.cc
  plugin/innobase/buf/buf0buf.cc
  plugin/innobase/buf/buf0flu.cc
  plugin/innobase/buf/buf0lru.cc
  plugin/innobase/buf/buf0rea.cc
  plugin/innobase/dict/dict0dict.cc
  plugin/innobase/dict/dict0load.cc
  plugin/innobase/dict/dict0mem.cc
  plugin/innobase/fil/fil0fil.cc
  plugin/innobase/fsp/fsp0fsp.cc
  plugin/innobase/handler/ha_innodb.cc
  plugin/innobase/handler/handler0alter.cc
  plugin/innobase/handler/internal_dictionary.cc
  plugin/innobase/handler/replication_dictionary.cc
  plugin/innobase/handler/replication_log.cc
  plugin/innobase/ibuf/ibuf0ibuf.cc
  plugin/innobase/include/btr0btr.h
  plugin/innobase/include/btr0cur.h
  plugin/innobase/include/btr0pcur.h
  plugin/innobase/include/btr0pcur.ic
  plugin/innobase/include/btr0types.h
  plugin/innobase/include/buf0buf.h
  plugin/innobase/include/buf0flu.h
  plugin/innobase/include/buf0lru.h
  plugin/innobase/include/buf0rea.h
  plugin/innobase/include/data0data.h
  plugin/innobase/include/data0data.ic
  plugin/innobase/include/dict0dict.h
  plugin/innobase/include/dict0dict.ic
  plugin/innobase/include/dict0load.h
  plugin/innobase/include/dict0mem.h
  plugin/innobase/include/dict0types.h
  plugin/innobase/include/ha_prototypes.h
  plugin/innobase/include/ibuf0ibuf.h
  plugin/innobase/include/ibuf0ibuf.ic
  plugin/innobase/include/mem0mem.h
  plugin/innobase/include/mem0mem.ic
  plugin/innobase/include/mtr0mtr.h
  plugin/innobase/include/mtr0mtr.ic
  plugin/innobase/include/os0file.h
  plugin/innobase/include/page0page.h
  plugin/innobase/include/page0zip.h
  plugin/innobase/include/rem0cmp.h
  plugin/innobase/include/rem0cmp.ic
  plugin/innobase/include/rem0rec.h
  plugin/innobase/include/rem0rec.ic
  plugin/innobase/include/row0upd.h
  plugin/innobase/include/srv0srv.h
  plugin/innobase/include/sync0arr.h
  plugin/innobase/include/sync0rw.h
  plugin/innobase/include/sync0sync.h
  plugin/innobase/include/trx0purge.h
  plugin/innobase/include/trx0rseg.h
  plugin/innobase/include/trx0sys.h
  plugin/innobase/include/trx0sys.ic
  plugin/innobase/include/trx0trx.h
  plugin/innobase/include/univ.i
  plugin/innobase/include/ut0ut.h
  plugin/innobase/include/ut0vec.h
  plugin/innobase/include/ut0vec.ic
  plugin/innobase/lock/lock0lock.cc
  plugin/innobase/log/log0recv.cc
  plugin/innobase/mem/mem0dbg.cc
  plugin/innobase/mem/mem0mem.cc
  plugin/innobase/mtr/mtr0mtr.cc
  plugin/innobase/os/os0file.cc
  plugin/innobase/page/page0cur.cc
  plugin/innobase/page/page0page.cc
  plugin/innobase/page/page0zip.cc
  plugin/innobase/plugin.am
  plugin/innobase/rem/rem0cmp.cc
  plugin/innobase/row/row0ins.cc
  plugin/innobase/row/row0merge.cc
  plugin/innobase/row/row0mysql.cc
  plugin/innobase/row/row0purge.cc
  plugin/innobase/row/row0umod.cc
  plugin/innobase/row/row0upd.cc
  plugin/innobase/row/row0vers.cc
  plugin/innobase/srv/srv0srv.cc
  plugin/innobase/srv/srv0start.cc
  plugin/innobase/sync/sync0arr.cc
  plugin/innobase/sync/sync0rw.cc
  plugin/innobase/sync/sync0sync.cc
  plugin/innobase/trx/trx0i_s.cc
  plugin/innobase/trx/trx0purge.cc
  plugin/innobase/trx/trx0roll.cc
  plugin/innobase/trx/trx0rseg.cc
  plugin/innobase/trx/trx0sys.cc
  plugin/innobase/trx/trx0trx.cc
  plugin/innobase/ut/ut0dbg.cc
  plugin/innobase/ut/ut0ut.cc
  plugin/innobase/xtrabackup/xtrabackup.cc
pending merge tips: (use -v to see all merge revisions)
  Stewart Smith 2012-05-23 Merge InnoDB from MySQL 5.5.12 (no InnoDB version bump)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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. */
467
474
UNIV_INTERN
468
475
void
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
476
 
to free the field.
477
 
@return TRUE if BLOB ownership was transferred */
 
483
to free the field. */
478
484
UNIV_INTERN
479
 
ibool
480
 
btr_cur_mark_extern_inherited_fields(
481
 
/*=================================*/
 
485
void
 
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. */
493
 
UNIV_INTERN
494
 
void
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. */
502
 
UNIV_INTERN
503
 
void
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.
512
501
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
513
502
UNIV_INTERN
514
503
ulint
515
 
btr_store_big_rec_extern_fields(
516
 
/*============================*/
 
504
btr_store_big_rec_extern_fields_func(
 
505
/*=================================*/
517
506
        dict_index_t*   index,          /*!< in: index of rec; the index tree
518
507
                                        MUST be X-latched */
519
508
        buf_block_t*    rec_block,      /*!< in/out: block containing rec */
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
 
514
#ifdef UNIV_DEBUG
 
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));
 
525
 
 
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 */
 
539
#ifdef UNIV_DEBUG
 
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)
 
545
#else
 
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)
 
548
#endif
 
549
 
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,