Commit e256beb9 authored by unknown's avatar unknown

ha_innodb.h, ha_innodb.cc:

  Make ANALYZE TABLE to update index cardinality and other statistics also for an InnoDB table; note that the estimates are based on 10 random dives, not on an exhaustive read of the table


sql/ha_innodb.cc:
  Make ANALYZE TABLE to update index cardinality and other statistics also for an InnoDB table; note that the estimates are based on 10 random dives, not on an exhaustive read of the table
sql/ha_innodb.h:
  Make ANALYZE TABLE to update index cardinality and other statistics also for an InnoDB table; note that the estimates are based on 10 random dives, not on an exhaustive read of the table
parent a1f124a5
...@@ -3756,6 +3756,23 @@ ha_innobase::info( ...@@ -3756,6 +3756,23 @@ ha_innobase::info(
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
/**************************************************************************
Updates index cardinalities of the table, based on 10 random dives into
each index tree. This does NOT calculate exact statistics of the table. */
int
ha_innobase::analyze(
/*=================*/
/* out: returns always 0 (success) */
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);
}
/*********************************************************************** /***********************************************************************
Tries to check that an InnoDB table is not corrupted. If corruption is Tries to check that an InnoDB table is not corrupted. If corruption is
noticed, prints to stderr information about it. In case of corruption noticed, prints to stderr information about it. In case of corruption
......
...@@ -152,6 +152,7 @@ class ha_innobase: public handler ...@@ -152,6 +152,7 @@ class ha_innobase: public handler
void position(const byte *record); void position(const byte *record);
void info(uint); void info(uint);
int analyze(THD* thd,HA_CHECK_OPT* check_opt);
int extra(enum ha_extra_function operation); int extra(enum ha_extra_function operation);
int reset(void); int reset(void);
int external_lock(THD *thd, int lock_type); int external_lock(THD *thd, int lock_type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment