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

Add a way to access the global default value of per-connection replication configurations

    XMLWordPrintable

Details

    Description

      When multi-source replication was added, it also upgraded several replication system variables so each connection can set its own values.

      • @@EU.replicate_do_table refers to the EU connection's replicate_do_table.
      • For compatibility, @@replicate_do_table refers to @@default_master_connection's replicate_do_table.
      • (What about the default connection with a blank name? @@.replicate_do_table?)

      There was a curious but convenient decision, possibly again for compatibility:

      • While server options (including config files) can also configure a specific connection via, e.g., --EU.replicate-do-table,
      • --replicate-do-table & co. set defaults for every connection that aren't individually set, instead of some (arbitrary) --default-master-connection.

      Fast-forward to recent times, MDEV-25674 and MDEV-28302 (both for CHANGE MASTER) have also used the prefix-less syntax for unset defaults.
      But this design left a gap that MDEV-28302 couldn't answer:
      When needed, how to access these defaults, ideally with the @@scope.variable syntax?


      I propose using a keyword for the scope/connection part of the syntax; though how?

      • While GLOBAL isn't new syntax, repurposing means semantics skewing.
      • At the inconvenience of a connection named "DEFAULT", a new @@DEFAULT.variable syntax would be fresh, but should it be
        • the "scope" of default values, making it a different semantic from if DEFAULT keywords on the right side of the =?
        • the mandatory alias for referencing the @@default_master_connection, so the prefix-less syntax can "rightfully" refer to the server option counterparts, matching non-multi-source system variables?

      There's another option nobody brought up:
      Move all of those system variables to CHANGE MASTER options - IIRC, it's what MySQL did, too.

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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