diff options
author | Igor Babaev <igor@askmonty.org> | 2012-12-13 23:05:12 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-12-13 23:05:12 -0800 |
commit | a06224bd1594ea1da650f748a8956922eafd2363 (patch) | |
tree | 99fc4c066ce8e3b9c0037333c62b993a787458d8 /sql/sql_admin.cc | |
parent | 65820439bdafeead66496b489c076012c334c710 (diff) | |
download | mariadb-git-a06224bd1594ea1da650f748a8956922eafd2363.tar.gz |
Addressed all remaining issues from the review of the patch
that introduced engine independent persistent statistics.
In particular:
- added an enumeration type for possible values of the system
variable use_stat_tables
- renamed KEY::real_rec_per_key to KEY::actual_rec_per_key
- optimized the collection of statistical data for any primary
key defined only on one column.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index f2124dd3bb8..e6bbef482a7 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -29,6 +29,7 @@ #include "sql_parse.h" // check_table_access #include "strfunc.h" #include "sql_admin.h" +#include "sql_statistics.h" /* Prepare, run and cleanup for mysql_recreate_table() */ @@ -718,7 +719,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, if (compl_result_code == HA_ADMIN_OK && operator_func == &handler::ha_analyze && table->table->s->table_category == TABLE_CATEGORY_USER && - (thd->variables.use_stat_tables > 0 || + (get_use_stat_tables_mode(thd) > NEVER || lex->with_persistent_for_clause)) { if (!(compl_result_code= |