Details
Description
ha_innobase::analyze(
/*=================*/
THD* thd, /*!< in: connection thread handle */
HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
{
/* Simply call ::info() with all the flags */
info(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE);
return(0);
}
versus this code in ::info():
if (flag & HA_STATUS_TIME) {
if (innobase_stats_on_metadata) {
/* In sql_show we call with this flag: update
then statistics so that they are up-to-date */
prebuilt->trx->op_info = "updating table statistics";
dict_update_statistics(ib_table);
prebuilt->trx->op_info = "returning various info to MySQL";
}
The solution is pretty simple, in ::info() do something like the following:
if (! innobase_stats_on_metadata)
dict_update_statistics(prebuilt->table);
It does not seem like it was the intention of innobase_stats_on_metadata to also disable ANALYZE
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: disabling innobase_stats_on_metadata disables ANALYZE
XtraDB already has the following code.
if (flag & HA_STATUS_TIME) {
+ if (innobase_stats_on_metadata
+ || thd_sql_command(user_thd) == SQLCOM_ANALYZE
+ ) {
/* In sql_show we call with this flag: update
then statistics so that they are up-to-date */
Why was the bug confirmed??