Prompts storage engine to report statistics.
virtual void info
This is the
::info() is used to return information to the optimizer.
Currently, this table handler doesn't implement most of the
fields really needed. SHOW also makes use of this data Another
note, you will probably want to have the following in your code:
if (records < 2) records = 2; The reason is that the server
will optimize for cases of only a single record. If in a table
scan you don't know the number of records it will probably be
better to set records to two so you can return as many records
as you need. Along with records a few more variables you may
wish to set are: records deleted data_file_length
index_file_length delete_length check_time See public variables
in handler.h for more information.
Called in: filesort.cc ha_heap.cc item_sum.cc opt_sum.cc
sql_delete.cc sql_delete.cc sql_derived.cc sql_select.cc
sql_select.cc sql_select.cc sql_select.cc sql_select.cc
sql_show.cc sql_show.cc sql_show.cc sql_show.cc sql_table.cc
There are no return values.
This example is from the
CSV storage engine:
void ha_tina::info(uint flag)
/* This is a lie, but you don't want the optimizer to see zero or 1 */
if (records < 2)