Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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
- split from
-
MDEV-253 Multi-source replication
-
- Closed
-
-
MDEV-25674 No SQL variable for master_retry_count setting
-
- Closed
-
-
MDEV-28302 Configurable defaults for MASTER_SSL_* settings for CHANGE MASTER
-
- Closed
-
-
MDEV-38972 Refactor MDEV-37530 and MDEV-28302 to Use Internal Data Structures
-
- In Progress
-