diff options
| author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-08-02 11:05:29 +0200 |
|---|---|---|
| committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-08-02 11:05:29 +0200 |
| commit | ef7cb0a0b5108b74c23bf6190f7df2cbfe2996a6 (patch) | |
| tree | 5c5c70ee11cdf4414a9cc9a5eacdae881933c70a /sql/sql_admin.cc | |
| parent | 5ec40fbb2704a0bf1369836d88a5def4721809c8 (diff) | |
| parent | 09ec8e2e2246f9fb67fd41631c5669d9ae26b2e5 (diff) | |
| download | mariadb-git-ef7cb0a0b5108b74c23bf6190f7df2cbfe2996a6.tar.gz | |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_admin.cc')
| -rw-r--r-- | sql/sql_admin.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 7ace3144dc3..ed0f37b8e75 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -765,8 +765,18 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, { compl_result_code= result_code= HA_ADMIN_INVALID; } + + /* + The check for Alter_info::ALTER_ADMIN_PARTITION implements this logic: + do not collect EITS STATS for this syntax: + ALTER TABLE ... ANALYZE PARTITION p + EITS statistics is global (not per-partition). Collecting global stats + is much more expensive processing just one partition, so the most + appropriate action is to just not collect EITS stats for this command. + */ collect_eis= (table->table->s->table_category == TABLE_CATEGORY_USER && + !(lex->alter_info.flags &= Alter_info::ALTER_ADMIN_PARTITION) && (get_use_stat_tables_mode(thd) > NEVER || lex->with_persistent_for_clause)); } |
