Documentation Home
MySQL Internals Manual

23.18.23 rnd_pos


Return row based on position.


virtual int rnd_pos (



byte *

buf ;

byte *

pos ;


This is the rnd_pos method.

Used for finding row previously marked with position. This is useful for large sorts.

This is like rnd_next, but you are given a position to use to determine the row. The position will be of the type that you stored in ref. You can use ha_get_ptr(pos,ref_length) to retrieve whatever key or position you saved when position() was called. Called from


  • buf

  • pos

Return Values

This method has no return values.


Locate row based on position value and return in buffer provided.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.