Functions |
UNIV_INLINE page_t * | page_cur_get_page (page_cur_t *cur) |
UNIV_INLINE buf_block_t * | page_cur_get_block (page_cur_t *cur) |
UNIV_INLINE page_zip_des_t * | page_cur_get_page_zip (page_cur_t *cur) |
UNIV_INLINE rec_t * | page_cur_get_rec (page_cur_t *cur) |
UNIV_INLINE void | page_cur_set_before_first (const buf_block_t *block, page_cur_t *cur) |
UNIV_INLINE void | page_cur_set_after_last (const buf_block_t *block, page_cur_t *cur) |
UNIV_INLINE ibool | page_cur_is_before_first (const page_cur_t *cur) |
UNIV_INLINE ibool | page_cur_is_after_last (const page_cur_t *cur) |
UNIV_INLINE void | page_cur_position (const rec_t *rec, const buf_block_t *block, page_cur_t *cur) |
UNIV_INLINE void | page_cur_invalidate (page_cur_t *cur) |
UNIV_INLINE void | page_cur_move_to_next (page_cur_t *cur) |
UNIV_INLINE void | page_cur_move_to_prev (page_cur_t *cur) |
UNIV_INLINE ulint | page_cur_search (const buf_block_t *block, const dict_index_t *index, const dtuple_t *tuple, ulint mode, page_cur_t *cursor) |
UNIV_INLINE rec_t * | page_cur_tuple_insert (page_cur_t *cursor, const dtuple_t *tuple, dict_index_t *index, ulint **offsets, mem_heap_t **heap, ulint n_ext, mtr_t *mtr) |
UNIV_INLINE rec_t * | page_cur_rec_insert (page_cur_t *cursor, const rec_t *rec, dict_index_t *index, ulint *offsets, mtr_t *mtr) |
The page cursor
Created 10/4/1994 Heikki Tuuri
Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized.
IMPORTANT: The caller will have to update IBUF_BITMAP_FREE if this is a compressed leaf page in a secondary index. This has to be done either within the same mini-transaction, or by invoking ibuf_reset_free_bits() before mtr_commit().
- Returns
- pointer to record if succeed, NULL otherwise
- Parameters
-
cursor | in/out: a page cursor |
rec | in: record to insert |
index | in: record descriptor |
offsets | in/out: rec_get_offsets(rec, index) |
mtr | in: mini-transaction handle, or NULL |
Inserts a record next to page cursor. Returns pointer to inserted record if succeed, i.e., enough space available, NULL otherwise. The cursor stays at the same logical position, but the physical position may change if it is pointing to a compressed page that was reorganized.
IMPORTANT: The caller will have to update IBUF_BITMAP_FREE if this is a compressed leaf page in a secondary index. This has to be done either within the same mini-transaction, or by invoking ibuf_reset_free_bits() before mtr_commit().
- Returns
- pointer to record if succeed, NULL otherwise
- Parameters
-
cursor | in/out: a page cursor |
tuple | in: pointer to a data tuple |
index | in: record descriptor |
offsets | out: offsets on *rec |
heap | in/out: pointer to memory heap, or NULL |
n_ext | in: number of externally stored columns |
mtr | in: mini-transaction handle, or NULL |