/** B-tree cursor */
typedef struct btr_cur_struct        btr_cur_t;

/** The tree cursor: the definition appears here only for the compiler
to know struct size! */
struct btr_cur_struct {
    dict_index_t*    index;        /*!< index where positioned */
    page_cur_t    page_cur;    /*!< page cursor */
    purge_node_t*    purge_node;    /*!< purge node, for BTR_DELETE */
    buf_block_t*    left_block;    /*!< this field is used to store
                    a pointer to the left neighbor
                    page, in the cases
                    BTR_SEARCH_PREV and
                    BTR_MODIFY_PREV */
    /*------------------------------*/
    que_thr_t*    thr;        /*!< this field is only used
                    when btr_cur_search_to_nth_level
                    is called for an index entry
                    insertion: the calling query
                    thread is passed here to be
                    used in the insert buffer */
    /*------------------------------*/
    /** The following fields are used in
    btr_cur_search_to_nth_level to pass information: */
    /* @{ */
    enum btr_cur_method    flag;    /*!< Search method used */
    ulint        tree_height;    /*!< Tree height if the search is done
                    for a pessimistic insert or update
                    operation */
    ulint        up_match;    /*!< If the search mode was PAGE_CUR_LE,
                    the number of matched fields to the
                    the first user record to the right of
                    the cursor record after
                    btr_cur_search_to_nth_level;
                    for the mode PAGE_CUR_GE, the matched
                    fields to the first user record AT THE
                    CURSOR or to the right of it;
                    NOTE that the up_match and low_match
                    values may exceed the correct values
                    for comparison to the adjacent user
                    record if that record is on a
                    different leaf page! (See the note in
                    row_ins_duplicate_key.) */
    ulint        up_bytes;    /*!< number of matched bytes to the
                    right at the time cursor positioned;
                    only used internally in searches: not
                    defined after the search */
    ulint        low_match;    /*!< if search mode was PAGE_CUR_LE,
                    the number of matched fields to the
                    first user record AT THE CURSOR or
                    to the left of it after
                    btr_cur_search_to_nth_level;
                    NOT defined for PAGE_CUR_GE or any
                    other search modes; see also the NOTE
                    in up_match! */
    ulint        low_bytes;    /*!< number of matched bytes to the
                    right at the time cursor positioned;
                    only used internally in searches: not
                    defined after the search */
    ulint        n_fields;    /*!< prefix length used in a hash
                    search if hash_node != NULL */
    ulint        n_bytes;    /*!< hash prefix bytes if hash_node !=
                    NULL */
    ulint        fold;        /*!< fold value used in the search if
                    flag is BTR_CUR_HASH */
    /* @} */
    btr_path_t*    path_arr;    /*!< in estimating the number of
                    rows in range, we store in this array
                    information of the path through
                    the tree */
};

btr_cur_t;的更多相关文章

  1. MySQL AHI 实现解析

    版权声明:本文由musazhang原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/904925001482373849 来源 ...

  2. 宏btr_pcur_open_on_user_rec

    参考http://wqtn22.iteye.com/blog/1820436 http://blog.jcole.us/2013/01/10/btree-index-structures-in-inn ...

  3. btr_pcur_t

    /** Persistent cursor */ typedef struct btr_pcur_struct btr_pcur_t; /* The persistent B-tree cursor ...

  4. 腾讯云数据库团队:MySQL AHI 实现解析

    MySQL 定位用户记录的过程可以描述为:打开索引 -> 根据索引键值逐层查找 B+ 树 branch 结点 -> 定位到叶子结点,将 cursor 定位到满足条件的 rec 上:如果树高 ...

  5. ubuntu 18.04下载mysql8.0.13源码并编译安装(暂时没有成功)

    执行如下命令下载解压MySQL8的源码文件压缩包到本地文件: wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.13.ta ...

  6. 源码浅析:MySQL一条insert操作,会写哪些文件?包括UNDO相关的文件吗?

    DML操作的大致流程 在解答上述疑惑之前,我们来梳理一下DML操作的大致流程: 1.语法解析.语义解析 2.生成执行计划 3.事务修改阶段 1) 激活事务,事务状态由not_active变为activ ...

  7. 源码浅析:InnoDB聚集索引如何定位到数据的物理位置,并从磁盘读取

    索引结构概述: MyISAM索引文件和数据文件是分离的,索引文件仅保存数据记录的地址.这与Oracle的索引结构相似,比较好理解.那么,常用的Innodb聚集索引结构是怎样的呢? InnoDB的数据文 ...

随机推荐

  1. cadence16.6 中orcad导出网表时ERROR (ORCAP-5004)

    ORCAD网表输出时 ERROR (ORCAP-5004):Error  initializing COM  property   pages 之前遇到过这个问题,解决后忘了记录下来了.依稀记得问题答 ...

  2. CSS进阶

    盒子模型的边框就是围绕着内容及补白的线,这条线你可以设置它的粗细.样式和颜色(边框三个属性). 1.border-style(边框样式)常见样式有:dashed(虚线)| dotted(点线)| so ...

  3. Netty 中文教程 Hello World !详解

    1.HelloServer 详解 HelloServer首先定义了一个静态终态的变量---服务端绑定端口7878.至于为什么是这个7878端口,纯粹是笔者个人喜好.大家可以按照自己的习惯选择端口.当然 ...

  4. 宏基5750G 不能用内置无线网卡上网

    宏基5750G 不能用内置无线网卡上网 具体体现在: 1.--> 搜索不到无线网络: 2.点击“打开网络和共享中心”-->没有“管理无线网络”一项.如果正常的话应该是这样的: 3.“我的电 ...

  5. WCF 笔记 (2) - 传输泛型 List 对象

    WCF 笔记 (2) - 传输泛型 List 对象 本帖介绍怎么在 WCF 中,在 Server-side 和 Client-side 之间,传递默认无法传输的 List<T>.List& ...

  6. lua语言入门之Sublime Text设置lua的Build System

    转自: http://blog.csdn.net/wangbin_jxust/article/details/8911956 最近开始学习LUA语言,使用Sublime Text作为编辑器,不得不说, ...

  7. hdu 1005 Number Sequence(矩阵快速幂,找规律,模版更通用)

    题目 第一次做是看了大牛的找规律结果,如下: //显然我看了答案,循环节点是48,但是为什么是48,据说是高手打表出来的 #include<stdio.h> int main() { ], ...

  8. SQL 中的游标实例

    --声明变量 declare @IMType varchar(10),@IMResourceID varchar(10) --定义游标 declare information_cursor curso ...

  9. android Notification定义与应用

    首先要明白一个概念: Intent 与 PendingIntent 的区别: Intent:是意图,即告诉系统我要干什么,然后做Intent应该做的事,而intent是消息的内容 PendingInt ...

  10. 2014多校第一场A题 || HDU 4861 Couple doubi

    题目链接 题意 : 有K个球,给你一个数P,可以求出K个值,(i=1,2,...,k) : 1^i+2^i+...+(p-1)^i (mod p).然后女朋友先取,再xp取,都希望赢,如果女朋友能赢输 ...