码迷,mamicode.com
首页 > 其他好文 > 详细

ha_innobase::rnd_next

时间:2015-12-12 01:34:04      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:

 

/*****************************************************************//**
Reads the next row in a table scan (also used to read the FIRST row
in a table scan).
@return    0, HA_ERR_END_OF_FILE, or error number */
UNIV_INTERN
int
ha_innobase::rnd_next(
/*==================*/
    uchar*    buf)    /*!< in/out: returns the row in this buffer,
            in MySQL format */
{
    int    error;

    DBUG_ENTER("rnd_next");
    ha_statistic_increment(&SSV::ha_read_rnd_next_count);

    if (start_of_scan) {
        error = index_first(buf);

        if (error == HA_ERR_KEY_NOT_FOUND) {
            error = HA_ERR_END_OF_FILE;
        }

        start_of_scan = 0;
    } else {
        error = general_fetch(buf, ROW_SEL_NEXT, 0);
    }

    DBUG_RETURN(error);
}

 

ha_innobase::rnd_next

标签:

原文地址:http://www.cnblogs.com/taek/p/5040580.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!