Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 0.8Mb


MySQL Internals Manual  /  ...  /  Implementing the position() Method

22.15.1 Implementing the position() Method

The [custom-engine.html#custom-engine-api-reference-position position()] method is called after every call to rnd_next() if the data needs to be reordered:

void ha_foo::position(const byte *record) 

It stores a "position" of a record in this->ref. The contents of this "position" is up to you, whatever value you provide will be returned in a later call to retrieve the row. The only rule - "position" or a row must contain enough information to allow you later to retrieve this very row. Most storage engines will store some form of offset or a primary key value.


User Comments
Sign Up Login You must be logged in to post a comment.