https://bugs.openldap.org/show_bug.cgi?id=9297
--- Comment #6 from Konstantin Andreev grapvar@gmail.com --- (In reply to Howard Chu from comment #5)
cursor_get may return EINVAL when given invalid parameters or for other misuses of its API. back-mdb never misuses the API. Therefore, your concern here is invalid.
Are I/O errors impossible during mdb_cursor_get()?