MDEV-33938 Analyze table on sequences should be prohibited

This commit is contained in:
Monty 2024-04-18 16:29:19 +03:00 committed by Sergei Golubchik
parent 9e7e1f6244
commit ae9a4799d7
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,6 @@ Table Op Msg_type Msg_text
test.s1 optimize note The storage engine for the table doesn't support optimize test.s1 optimize note The storage engine for the table doesn't support optimize
analyze table s1; analyze table s1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.s1 analyze status Engine-independent statistics collected
test.s1 analyze note The storage engine for the table doesn't support analyze test.s1 analyze note The storage engine for the table doesn't support analyze
repair table s1; repair table s1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text

View File

@ -924,7 +924,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
appropriate action is to just not collect EITS stats for this command. appropriate action is to just not collect EITS stats for this command.
*/ */
collect_eis= collect_eis=
(table->table->s->table_category == TABLE_CATEGORY_USER && (tab->s->table_category == TABLE_CATEGORY_USER && !tab->s->sequence &&
!(lex->alter_info.partition_flags & ALTER_PARTITION_ADMIN) && !(lex->alter_info.partition_flags & ALTER_PARTITION_ADMIN) &&
(check_eits_collection_allowed(thd) || (check_eits_collection_allowed(thd) ||
lex->with_persistent_for_clause)); lex->with_persistent_for_clause));

View File

@ -3268,7 +3268,8 @@ read_statistics_for_tables(THD *thd, TABLE_LIST *tables, bool force_reload)
TABLE_SHARE *table_share; TABLE_SHARE *table_share;
/* Skip tables that can't have statistics. */ /* Skip tables that can't have statistics. */
if (tl->is_view_or_derived() || !table || !(table_share= table->s)) if (tl->is_view_or_derived() || !table || !(table_share= table->s) ||
table_share->sequence)
continue; continue;
/* Skip temporary tables */ /* Skip temporary tables */
if (table_share->tmp_table != NO_TMP_TABLE) if (table_share->tmp_table != NO_TMP_TABLE)