summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-08-03 13:41:29 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2020-08-03 13:41:29 +0200
commitc32f71af7e4b747de223bf6b44e691941f5997cf (patch)
tree03270b9a849e165f1c8605102ee06bced2331477 /sql/sql_admin.cc
parent4d41f316c3c1c05fdd35cbdc1b626d596b89af40 (diff)
parent555c6632c69d707cc1641ef396e7b66a65f14bdc (diff)
downloadmariadb-git-c32f71af7e4b747de223bf6b44e691941f5997cf.tar.gz
Merge branch '10.2' into 10.3
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 a094568071b..89ef6d7793f 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) &&
(get_use_stat_tables_mode(thd) > NEVER ||
lex->with_persistent_for_clause));
}