If you’re getting an error when specifying LAST
or PREV
for MySQL’s HANDLER
statement, it could be that you’re trying to do a table scan using the index syntax.
While the HANDLER
statement does accept the LAST
and PREV
options, we can only use them with an index.
So to fix this issue, be sure to specify an index when using the LAST
and PREV
options.