Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.4.14
-
None
Description
When adding column to table with system versioning in Galera cluster, the column is only added on first node, other nodes do not get the column added and instead print this warning in their logs:
2020-10-08 15:29:23 2 [Warning] WSREP: Ignoring error 'Not allowed for system-versioned `dbname`.`tablename`. Change @@system_versioning_alter_history to proceed with ALTER.' on query.
To reproduce:
1. On 2-node Galera cluster, create simple table:
CREATE TABLE `tablename` ( |
`id` SERIAL,
|
`start_time` TIMESTAMP(6) GENERATED ALWAYS AS ROW START INVISIBLE, |
`end_time` TIMESTAMP(6) GENERATED ALWAYS AS ROW END INVISIBLE, |
PRIMARY KEY (`id`) |
)
|
ENGINE = InnoDB
|
DEFAULT CHARACTER SET = latin1 WITH SYSTEM VERSIONING; |
2) Try to add a new column to the table:
SET @@system_versioning_alter_history = 'KEEP'; |
ALTER TABLE tablename |
ADD COLUMN `newcol` VARCHAR(1024) DEFAULT NULL |
AFTER id; |
SET @@system_versioning_alter_history = 0; |
Notice that new column is added on whichever Galera node #2 was run on, but propagation to other nodes is not successful.