1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-36032 Check whether a table can be a sequence when ALTERed with SEQUENCE=1

To check the rows, the table needs to be opened. To that end, and like
MDEV-36038, we force COPY algorithm on ALTER TABLE ... SEQUENCE=1.
This also results in checking the sequence state / metadata.

The table structure was already validated before this patch.
This commit is contained in:
Yuchen Pei
2025-04-29 16:28:01 +10:00
parent cafd22db79
commit 6f8ef26885
5 changed files with 180 additions and 0 deletions

View File

@@ -5454,6 +5454,9 @@ handler::check_if_supported_inplace_alter(TABLE *altered_table,
(table->s->row_type != create_info->row_type))
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
if (create_info->sequence)
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
uint table_changes= (ha_alter_info->handler_flags &
ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE) ?
IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES;