[MDEV-23923] add column to table with system versioning on Galera cluster is not replicated Created: 2020-10-08  Updated: 2023-08-07  Resolved: 2023-08-07

Status: Closed
Project: MariaDB Server
Component/s: Galera, Versioned Tables
Affects Version/s: 10.4.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Matt Assignee: Jan Lindström
Resolution: Incomplete Votes: 0
Labels: 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.



 Comments   
Comment by Jan Lindström [ 2023-07-10 ]

matt666 What is value of system_versioning_alter_history variable on those other nodes? Note that these SET clauses are not replicated.

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