Bug #52162 get_index_only_read_time in opt_range.cc should be a handler function
| Submitted: | 18 Mar 2010 2:45 | ||
|---|---|---|---|
| Reporter: | Zardosht Kasheff (OCA) | Email Updates: | |
| Status: | Open | Impact on me: | |
| Category: | MySQL Server: Storage Engine API | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | get_index_only_read_time, handler, storage engine | ||
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: The function get_index_only_read_time should be a handler function, whose default implementation is what is currently in opt_range.cc. This allows storage engines to override its behavior. Ideally, handler::read_time and handler::get_index_only_read_time can be collapsed into one function with an additional bool as a parameter (stating if it is index_only or not), so that the following code in get_key_scans_params is unnecesary: if (found_records != HA_POS_ERROR && found_records > 2 && read_index_only && (param->table->file->index_flags(keynr, param->max_key_part,1) & HA_KEYREAD_ONLY) && !(pk_is_clustered && keynr == param->table->s->primary_key)) { But this would break existing storage engines. So, in the meantime, I think making get_index_only_read_time its own handler function would be really helpful. How to repeat: n/a Suggested fix: n/a