/** 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. jquery插件——图片放大器

    用到了JQzoom插件,可以使图片实现放大效果

  2. [转载+原创]Emgu CV on C# (四) —— Emgu CV on 全局固定阈值二值化

    重点介绍了全局二值化原理及数学实现,并利用emgucv方法编程实现. 一.理论概述(转载,如果懂图像处理,可以略过,仅用作科普,或者写文章凑字数)  1.概述 图像二值化是图像处理中的一项基本技术,也 ...

  3. centos 7 有点意思

    Centos 7 防火墙 Centos尼马换了防火墙,名叫firewalld,还有iptables命令,这就叫坑爹.整了半个世纪才知道,他换了防火墙.添加滤镜,停止iptables都打不开80端口,简 ...

  4. ios 多任务学习笔记

    一.检测多任务是否支持: - (BOOL) isMultitaskingSupported{ BOOL result = NO; if ([[UIDevice currentDevice] respo ...

  5. UVA 10954 Add All 哈夫曼编码

    题目链接: 题目 Add All Time Limit:3000MS Memory Limit:0KB 问题描述 Yup!! The problem name reflects your task; ...

  6. POJ 3723 Conscription 最小生成树

    题目链接: 题目 Conscription Time Limit: 1000MS Memory Limit: 65536K 问题描述 Windy has a country, and he wants ...

  7. Eclipse 创建Maven工程

    前言 开发环境 sts-3.7.2.RELEASE 创建步骤 1.开启eclipse,右键new——>other,如下图找到maven project 2.选择maven project,显示创 ...

  8. 【POJ】【1741】/【BZOJ】【1468】Tree

    点分治 怎么又一道叫Tree的题目……真是醉了. 本题为漆子超论文<分治算法在树的路径问题中的应用>例一 题解 : http://blog.csdn.net/sdj222555/artic ...

  9. 【.Net--资料】

    1.http://msdn.microsoft.com/zh-cn/dn338450 2..NET Technology Guidance http://www.microsoft.com/net/n ...

  10. 安装JDK后JRE与JVM联系浅谈

    转自安装JDK后JRE与JVM联系浅谈 安装JDK后JRE.JVM之间的关系是什么呢?那么我们要从安装JDK慢慢说起. 如果安装了JDK,会发同你的电脑有两套JRE: 一套位于 <JDK安装目录 ...