1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Removed the server option --stat-tables.

Renamed the system variable optimizer_use_stat_tables to use_stat_tables.
This variable now has only 3 possible values:
'never', 'complementary', 'preferably'.
If the server has been launched with
--use-stat-tables='complementary'|'preferably'
then the statictics tables can be employed by the optimizer and by the
ANALYZE command.
This commit is contained in:
Igor Babaev
2012-06-02 17:19:01 -07:00
parent 2ee14ef9c3
commit f549f495f7
18 changed files with 244 additions and 295 deletions

View File

@ -700,9 +700,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
}
if (result_code == HA_ADMIN_OK &&
(operator_func != &handler::ha_analyze ||
thd->variables.optimizer_use_stat_tables < 3))
if (result_code == HA_ADMIN_OK)
{
DBUG_PRINT("admin", ("calling operator_func '%s'", operator_name));
result_code = (table->table->file->*operator_func)(thd, check_opt);
@ -710,8 +708,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
if (compl_result_code == HA_ADMIN_OK &&
operator_func == &handler::ha_analyze && opt_with_stat_tables &&
thd->variables.optimizer_use_stat_tables > 0)
operator_func == &handler::ha_analyze &&
thd->variables.use_stat_tables > 0)
{
if (!(compl_result_code=
collect_statistics_for_table(thd, table->table)))