/** 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. Perceptron Learning Algorithm (PLA)

    Perceptron - 感知机,是一种二元线性分类器,它通过对特征向量的加权求和,并把这个”和”与事先设定的门槛值(threshold)做比较,高于门槛值的输出1,低于门槛值的输出-1.其中sign ...

  2. C# - (0x80040154): Retrieving the COM class factory for component with CLSID {877AA945-1CB2-411C-ACD7-C70B1F9E2E32} failed

    1. Exeption Error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM clas ...

  3. js获取时间

    var myDate = new Date(); console.log(myDate.toLocaleString()); function getNowFormatDate() { var dat ...

  4. Atmel Studio 6.0新建项目

        使用Atmel Studio 6.0新建一个项目 连接Atmel 开发板与调试板,开发板使用的芯片是ATXMGEA128A1 注意: 以上对于开发板与调试板的连接,需要非常注意连接时线的方向, ...

  5. semantic

    cgfx 里会有这个 float4X4 View : View; :后面这个 view 是一种 叫做user defined semantic provide the correct data to ...

  6. SQLite 学习流水账笔记

    1.SQLite随机取n行数据,可加自己的条件 SELECT * FROM TableName WHERE key ? ORDER BY RANDOM() LIMIT ,Num; 2.sql语句中查询 ...

  7. 配置sql server2012属性 ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.zh-CHS/s10de_5techref/html/6df812ad-4d80-4503-8a23-47719ce85624.htm

    服务与服务器是两个不同的概念,服务器是提供服务的计算机,配置服务器主要是对内存.处理器.安全性等几个方面配置.由于SQL Server 2005服务器的设置参数比较多,这里选一些比较常用的介绍. 配置 ...

  8. 华为3C抢购难度

    上周小米2S降价到1299买了一个,今天突然想体验一下抢购红米和3C的难度.万一抢到了,拿到手机市场贵100块钱卖掉,然后可以请女神吃个饭~~~哈哈哈哈! 结果确实不怎么好抢.刚刚试了一下3C: 验证 ...

  9. keystonejs

    开始之前先确保你已经安装了Node.js 0.10+ 和MongoDB v2.4+. 要使用KeystoneJS,你需要掌握合理的Javascript知识,并熟悉数据库概念之类的基础知识,会用 nod ...

  10. 在mybatis执行SQL语句之前进行拦击处理

    转载自:http://blog.csdn.net/hfmbook/article/details/41985853 比较适用于在分页时候进行拦截.对分页的SQL语句通过封装处理,处理成不同的分页sql ...