Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14767

system_versioning_alter_history breaks ALTER replication

Details

    Description

      system_versioning_alter_history should either be GLOBAL-only, or be included into binlog events.

      ALTER TABLE for a versioned table can now break replication too easily, since system_versioning_alter_history can be changed by any user in a session (of course, not any user is allowed to ALTER a table, but still). Given the obvious effect that it has on replication, I think the value should be either included into the binary log, or only be modifiable globally. It would still break replication if it's modified globally, but the exposure would be not that big.

      The test case is obvious:

      --source include/master-slave.inc
       
      create or replace table t1 (a int) with system versioning;
      set system_versioning_alter_history= KEEP;
      alter table t1 add column b int;
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      drop table t1;
      --source include/rpl_end.inc
      

      Last_Errno	4118
      Last_Error	Error 'Not allowed for system-versioned `test`.`t1`. Change @@system_versioning_alter_history to proceed with ALTER.' on query. Default database: 'test'. Query: 'alter table t1 add column b int'
      

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Aleksey Midenkov made transition -
            Open In Progress
            50d 16h 11m 1
            Aleksey Midenkov made transition -
            In Progress Stalled
            3h 57m 1
            Sergei Golubchik made transition -
            Stalled Closed
            8d 7h 58m 1

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.