/*****************************************************************//** 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); }
时间: 2024-11-05 19:39:11