If your storage engine returns an error from rnd_init (or doStartTableScan as it’s named in Drizzle) and does not save this error and return it in any subsequent calls to rnd_next, your engine is buggy. Namely it is buggy in that a) an error may not be reported back to the user and b) everything may explode horribly when rnd_next is called after rnd_init returned an error.
Unless it is running on MariaDB 5.2 or (soon, when the patch hits the tree) Drizzle.
Monty (Widenius, not Taylor) wrote a patch for MariaDB based on my bug …
[Read more]