[MDEV-20572] Adding system-(un)versioned columns misbehaves with documentation Created: 2019-09-12  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Nikita Malyavin Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

marko provided the test case:

set @@system_versioning_alter_history = keep;
CREATE TABLE t (a INT) ENGINE=InnoDB;
--error ER_VERS_NOT_VERSIONED
ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING;
--echo # Wrong! Should be ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
--error ER_VERS_NOT_VERSIONED
ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
WITH SYSTEM VERSIONING, ALGORITHM=INSTANT;
--echo # Wrong! Should succeed!
--error ER_VERS_NOT_VERSIONED
ALTER TABLE t CHANGE COLUMN a alpha INT WITH SYSTEM VERSIONING,
WITH SYSTEM VERSIONING;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t WITH SYSTEM VERSIONING, ALGORITHM=INSTANT;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t WITH SYSTEM VERSIONING, ALGORITHM=NOCOPY;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t WITH SYSTEM VERSIONING, ALGORITHM=INPLACE;
ALTER TABLE t WITH SYSTEM VERSIONING;
DROP TABLE t;

The change has been made by MDEV-19127. At the same time, the concurrent change by MDEV-16490 introduced order-independent behavior (see pull request), but it was discarded by the author in favor of the latter one.

One of these two things should be done: either consider addressing the behavior on the documentation, or apply the discarded changes and tests from https://github.com/MariaDB/server/pull/803


Generated at Thu Feb 08 09:00:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.