Commit 9c855425 authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

MDEV-31775 Server crash upon online alter on sequence

Forbid online for sequences. It doesn't work now and sequence tables are
always only one row, so not worth the extra complexity.
parent 7d0d9eab
......@@ -219,3 +219,8 @@ create temporary table t (f int);
alter table t force, algorithm=instant;
ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY
drop table t;
create sequence s engine=MyISAM;
alter table s engine=Aria, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: SEQUENCE. Try LOCK=SHARED
alter table s engine=Aria;
drop sequence s;
......@@ -222,3 +222,9 @@ create temporary table t (f int);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table t force, algorithm=instant;
drop table t;
create sequence s engine=MyISAM;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table s engine=Aria, lock=none;
alter table s engine=Aria;
drop sequence s;
......@@ -9916,6 +9916,10 @@ const char *online_alter_check_supported(const THD *thd,
if (!*online)
return NULL;
*online= table->s->sequence == NULL;
if (!*online)
return "SEQUENCE";
*online= (alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING) == 0;
if (!*online)
return "DROP SYSTEM VERSIONING";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment