MySQL 8.4.0
Source Code Documentation
btr0pcur.h File Reference

The index tree persistent cursor. More...

#include "btr0btr.h"
#include "btr0cur.h"
#include "btr0types.h"
#include "buf0block_hint.h"
#include "data0data.h"
#include "dict0dict.h"
#include "mtr0mtr.h"
#include "page0cur.h"
#include "univ.i"
#include "gis0rtree.h"

Go to the source code of this file.

Classes

struct  import_ctx_t
 
struct  btr_pcur_t
 

Enumerations

enum  btr_pcur_pos_t {
  BTR_PCUR_UNSET = 0 , BTR_PCUR_ON = 1 , BTR_PCUR_BEFORE = 2 , BTR_PCUR_AFTER = 3 ,
  BTR_PCUR_BEFORE_FIRST_IN_TREE = 4 , BTR_PCUR_AFTER_LAST_IN_TREE = 5
}
 Relative positions for a stored cursor position. More...
 
enum  pcur_pos_t { BTR_PCUR_NOT_POSITIONED = 0 , BTR_PCUR_WAS_POSITIONED , BTR_PCUR_IS_POSITIONED_OPTIMISTIC , BTR_PCUR_IS_POSITIONED }
 Position state of persistent B-tree cursor. More...
 

Detailed Description

The index tree persistent cursor.

Created 2/23/1996 Heikki Tuuri

Enumeration Type Documentation

◆ btr_pcur_pos_t

Relative positions for a stored cursor position.

Enumerator
BTR_PCUR_UNSET 
BTR_PCUR_ON 
BTR_PCUR_BEFORE 
BTR_PCUR_AFTER 
BTR_PCUR_BEFORE_FIRST_IN_TREE 
BTR_PCUR_AFTER_LAST_IN_TREE 

◆ pcur_pos_t

enum pcur_pos_t

Position state of persistent B-tree cursor.

Enumerator
BTR_PCUR_NOT_POSITIONED 

The persistent cursor is not positioned.

BTR_PCUR_WAS_POSITIONED 

The persistent cursor was previously positioned.

TODO: currently, the state can be BTR_PCUR_IS_POSITIONED, though it really should be BTR_PCUR_WAS_POSITIONED, because we have no obligation to commit the cursor with mtr; similarly latch_mode may be out of date. This can lead to problems if btr_pcur is not used the right way; all current code should be ok.

BTR_PCUR_IS_POSITIONED_OPTIMISTIC 

The persistent cursor is positioned by optimistic get to the same record as it was positioned at.

Not used for rel_pos == BTR_PCUR_ON. It may need adjustment depending on previous/current search direction and rel_pos.

BTR_PCUR_IS_POSITIONED 

The persistent cursor is positioned by index search.

Or optimistic get for rel_pos == BTR_PCUR_ON.