/** Persistent cursor */
typedef struct btr_pcur_struct        btr_pcur_t;

/* The persistent B-tree cursor structure. This is used mainly for SQL
selects, updates, and deletes. */

struct btr_pcur_struct{
    btr_cur_t    btr_cur;    /*!< a B-tree cursor */
    ulint        latch_mode;    /*!< see TODO note below!
                    BTR_SEARCH_LEAF, BTR_MODIFY_LEAF,
                    BTR_MODIFY_TREE, or BTR_NO_LATCHES,
                    depending on the latching state of
                    the page and tree where the cursor is
                    positioned; the last value means that
                    the cursor is not currently positioned:
                    we say then that the cursor is
                    detached; it can be restored to
                    attached if the old position was
                    stored in old_rec */
    ulint        old_stored;    /*!< BTR_PCUR_OLD_STORED
                    or BTR_PCUR_OLD_NOT_STORED */
    rec_t*        old_rec;    /*!< if cursor position is stored,
                    contains an initial segment of the
                    latest record cursor was positioned
                    either on, before, or after */
    ulint        old_n_fields;    /*!< number of fields in old_rec */
    ulint        rel_pos;    /*!< BTR_PCUR_ON, BTR_PCUR_BEFORE, or
                    BTR_PCUR_AFTER, depending on whether
                    cursor was on, before, or after the
                    old_rec record */
    buf_block_t*    block_when_stored;/* buffer block when the position was
                    stored */
    ib_uint64_t    modify_clock;    /*!< the modify clock value of the
                    buffer block when the cursor position
                    was stored */
    enum pcur_pos_t    pos_state;    /*!< btr_pcur_store_position() and
                    btr_pcur_restore_position() state. */
    ulint        search_mode;    /*!< PAGE_CUR_G, ... */
    trx_t*        trx_if_known;    /*!< the transaction, if we know it;
                    otherwise this field is not defined;
                    can ONLY BE USED in error prints in
                    fatal assertion failures! */
    /*-----------------------------*/
    /* NOTE that the following fields may possess dynamically allocated
    memory which should be freed if not needed anymore! */

    byte*        old_rec_buf;    /*!< NULL, or a dynamically allocated
                    buffer for old_rec */
    ulint        buf_size;    /*!< old_rec_buf size if old_rec_buf
                    is not NULL */
};

btr_pcur_t的更多相关文章

  1. 宏btr_pcur_open_on_user_rec

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

  2. 结构体 row_prebuilt_t

    typedef struct row_prebuilt_struct row_prebuilt_t; /** A struct for (sometimes lazily) prebuilt stru ...

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

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

  4. MySQL Update执行流程解读

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 一.update跟踪执行配置 使用内部程序堆栈跟踪工具path_viewer,跟踪mysql update 一行数据的执行 ...

随机推荐

  1. UEFI+GPT 修复 win10启动

    要修复引导文件大致有以下几个步骤(按照我自己修复的步骤来的,其他情况可结合上面参考资料探索,大体思路应该没有变化): 挂载ESP分区 由于我的windows8.1已经无法进入了,Ubuntu不知道能不 ...

  2. EXT4.2--Ext Designer 使用

    前言: “画EXT”是一个美好的想法,如果有一款可视化工具能够只需进行拖拽而设计EXT,生成代码--那真是一件美丽的事.然而现实是,即使是为Eclipse装上EXT插件,用上idea,手写代码的提示也 ...

  3. $POST数组论证($GET || $COOKIE || $REQUEST 同理)

    我觉得还是有多个$_POST  如果只有一个$_POST,那么,多个人[同时]提交的话就不好处理  或者一个$_POST 时间限制(如同时钟周期)处理(不可能,不然响应没这么快) 或者 一个$_POS ...

  4. HDU 2489 Minimal Ratio Tree(dfs枚举+最小生成树)

    想到枚举m个点,然后求最小生成树,ratio即为最小生成树的边权/总的点权.但是怎么枚举这m个点,实在不会.网上查了一下大牛们的解法,用dfs枚举,没想到dfs还有这么个作用. 参考链接:http:/ ...

  5. 黑马程序员--C#中属性和字段(变量)的区别

    ---------------------- ASP.Net+Android+IOS开发..Net培训.期待与您交流! ---------------------- 属性为类提供了一种很有用的封装数据 ...

  6. 手动挂载安装VMware tools

    在VMware 10上装了Red Hat Enterprise Linux 4后,点击“安装VMware tools”后,虚拟机桌面一直不出现挂载了VMware tools的虚拟光驱.在/mnt 和/ ...

  7. 心情记录&考试总结 3.30

    并不知道现在要干什么,本人像是一只大颓狗 Em..怎么说呢,今天考完了一场奇怪的试 准确的说,画风很不正常的试 第一题集体爆零 第二题暴力20分 第三题暴力40分,乱搞有加成 改题的话, 第一题有奇怪 ...

  8. lintcode:最大子正方形

    题目: Maximal Square Given a 2D binary matrix filled with 0's and 1's, find the largest square contain ...

  9. *[hackerrank]Consecutive Subsequences

    https://www.hackerrank.com/contests/w6/challenges/consecutive-subsequences 求数组中被k整除的子段和有几个.这个要利用sum[ ...

  10. 查看服务器的TCP/IP(http)连接情况

    6.那具体到,怎样监听一个具体程序的TCP/IP连接情况呢???!! 就要用:netstat -n|grep 80 命令来查看具体端口对应程序的TCP/IP连接情况了 netstat -n|grep ...