diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-06 09:22:39 +0300 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-10-06 09:22:39 +0300 |
| commit | 6dc157f8a6a6f12fcb6877c65c23a2e7692e38fe (patch) | |
| tree | a143f8592261301d3e0a42dcc33bddc3634227d9 /storage/innobase/include/btr0cur.h | |
| parent | 286acaa796cd3c7e7a8d20eba20673ae1ab70b61 (diff) | |
| parent | 8d6421aa48de5f1581e0706cc65c3515954bcead (diff) | |
| download | mariadb-git-6dc157f8a6a6f12fcb6877c65c23a2e7692e38fe.tar.gz | |
Merge 10.5 into 10.6
Diffstat (limited to 'storage/innobase/include/btr0cur.h')
| -rw-r--r-- | storage/innobase/include/btr0cur.h | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index bbf7ab40d7e..6626b2e948a 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -142,53 +142,35 @@ btr_cur_optimistic_latch_leaves( mtr_t* mtr); MY_ATTRIBUTE((warn_unused_result)) -/********************************************************************//** -Searches an index tree and positions a tree cursor on a given level. +/** Searches an index tree and positions a tree cursor on a given level. NOTE: n_fields_cmp in tuple must be set so that it cannot be compared to node pointer page number fields on the upper levels of the tree! Note that if mode is PAGE_CUR_LE, which is used in inserts, then cursor->up_match and cursor->low_match both will have sensible values. -If mode is PAGE_CUR_GE, then up_match will a have a sensible value. */ -dberr_t -btr_cur_search_to_nth_level_func( - dict_index_t* index, /*!< in: index */ - ulint level, /*!< in: the tree level of search */ - const dtuple_t* tuple, /*!< in: data tuple; NOTE: n_fields_cmp in - tuple must be set so that it cannot get - compared to the node ptr page number field! */ - page_cur_mode_t mode, /*!< in: PAGE_CUR_L, ...; - NOTE that if the search is made using a unique - prefix of a record, mode should be PAGE_CUR_LE, - not PAGE_CUR_GE, as the latter may end up on - the previous page of the record! Inserts - should always be made using PAGE_CUR_LE to - search the position! */ - ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ..., ORed with - at most one of BTR_INSERT, BTR_DELETE_MARK, - BTR_DELETE; - cursor->left_block is used to store a pointer - to the left neighbor page, in the cases - BTR_SEARCH_PREV and BTR_MODIFY_PREV; - NOTE that if ahi_latch, we might not have a - cursor page latch, we assume that ahi_latch - protects the record! */ - btr_cur_t* cursor, /*!< in/out: tree cursor; the cursor page is - s- or x-latched, but see also above! */ -#ifdef BTR_CUR_HASH_ADAPT - srw_spin_lock* ahi_latch, - /*!< in: currently held AHI rdlock, or NULL */ -#endif /* BTR_CUR_HASH_ADAPT */ - mtr_t* mtr, /*!< in/out: mini-transaction */ - ib_uint64_t autoinc = 0); - /*!< in: PAGE_ROOT_AUTO_INC to be written - (0 if none) */ -#ifdef BTR_CUR_HASH_ADAPT -# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,mtr) \ - btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,a,mtr) -#else /* BTR_CUR_HASH_ADAPT */ -# define btr_cur_search_to_nth_level(i,l,t,m,lm,c,a,mtr) \ - btr_cur_search_to_nth_level_func(i,l,t,m,lm,c,mtr) -#endif /* BTR_CUR_HASH_ADAPT */ +If mode is PAGE_CUR_GE, then up_match will a have a sensible value. +@param index index +@param level the tree level of search +@param tuple data tuple; NOTE: n_fields_cmp in tuple must be set so that + it cannot get compared to the node ptr page number field! +@param mode PAGE_CUR_L, ...; NOTE that if the search is made using a + unique prefix of a record, mode should be PAGE_CUR_LE, not + PAGE_CUR_GE, as the latter may end up on the previous page of + the record! Inserts should always be made using PAGE_CUR_LE + to search the position! +@param latch_mode BTR_SEARCH_LEAF, ..., ORed with at most one of BTR_INSERT, + BTR_DELETE_MARK, or BTR_DELETE; + cursor->left_block is used to store a pointer to the left + neighbor page +@param cursor tree cursor; the cursor page is s- or x-latched, but see also + above! +@param mtr mini-transaction +@param autoinc PAGE_ROOT_AUTO_INC to be written (0 if none) +@return DB_SUCCESS on success or error code otherwise */ +dberr_t btr_cur_search_to_nth_level(dict_index_t *index, ulint level, + const dtuple_t *tuple, + page_cur_mode_t mode, ulint latch_mode, + btr_cur_t *cursor, mtr_t *mtr, + ib_uint64_t autoinc= 0); /*****************************************************************//** Opens a cursor at either end of an index. |
