1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

don't do DROP SYSTEM VERSIONING online

because ALTER TABLE ... DROP SYSTEM VERSIONING
is not just a change in the table structure, it also deletes
all historical rows
This commit is contained in:
Sergei Golubchik
2022-06-02 14:57:56 +02:00
parent 32c3d775e9
commit 3099a756ab
3 changed files with 50 additions and 95 deletions

View File

@ -10028,6 +10028,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
if (alter_info->requested_lock == Alter_info::ALTER_TABLE_LOCK_SHARED
|| alter_info->requested_lock > Alter_info::ALTER_TABLE_LOCK_NONE
|| alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING
|| thd->locked_tables_mode == LTM_LOCK_TABLES
|| thd->lex->sql_command == SQLCOM_OPTIMIZE
|| alter_info->algorithm(thd) > Alter_info::ALTER_TABLE_ALGORITHM_COPY)