Bug #26040 return values of ha_index_init() and index_init() ignored
Submitted: 2 Feb 2007 13:47 Modified: 29 Jul 2012 23:20
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.36 OS:Any (*)
Assigned to: Assigned Account CPU Architecture:Any
Tags: bfsm_2007_04_19, bfsm_2007_10_25, code, ha_index_init, ha_rnd_init

[2 Feb 2007 13:47] Shane Bester
handler::index_init() and handler::rnd_init() return errors, but many callers ignore the errors.

Code that ignores ha_index_init() and index_init() return codes:
handler.cc, sql_handler.cc, sql_acl.cc, sql_select.cc, item_subselect.cc, sp.cc, records.cc, sql_show.cc

Code that ignores ha_rnd_init() return codes:
filesort.cc, handler.cc, records.cc, sql_select.cc, sql_update.cc

see related bug #24986

How to repeat:
view the source.

Suggested fix:
[29 Jul 2012 23:20] Paul DuBois
Noted in 5.6.6 changelog.

Code for the storage engine API did not check the return value from
the ha_rnd_init(), ha_index_init(), and index_init() functions.