15.15.6. Preparing for Index Use with index_init()
The
index_init()
function is called before an index is used to allow the storage
engine to perform any necessary preparation or optimization:
int ha_foo::index_init(uint keynr, bool sorted)
Most storage engines do not need to make special preparations,
in which case a default implementation will be used if the
method is not explicitly implemented in the storage engine:
int handler::index_init(uint idx) { active_index=idx; return 0; }