summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 21:11:54 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 21:11:54 +0300
commit17be2b47ba32535e69e28da9a444e528ba8ab155 (patch)
tree2fd4dbeaba4035438a70059ccfdf584205a44704 /sql/sql_admin.cc
parent4ea915e28c3fc8abd164977408f8a69b61e4a997 (diff)
parent5b3d3792e28fc7a875c7060f772e42a9cd922f83 (diff)
downloadmariadb-git-17be2b47ba32535e69e28da9a444e528ba8ab155.tar.gz
Merge mariadb-10.5.5
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 71939936da0..dc9b971f2ed 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -768,8 +768,18 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
{
compl_result_code= result_code= HA_ADMIN_INVALID;
}
+
+ /*
+ The check for ALTER_PARTITION_ADMIN 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_PARTITION_ADMIN) &&
(check_eits_collection_allowed(thd) ||
lex->with_persistent_for_clause));
}