Per-session server_id
Currently server_id is a global variable. It makes sense to have it as a session variable too, for external replication such as Tungsten support. In that case a session replaying a binlog from another server would set it to that server's id. This way binlog has the ultimate source server id attached to it no matter how many hosts it passes, and that would provide loop detection for multi-master replication.
Simply changing server_id to be a session variable is impossible because then its global value changes would apply only to new sessions, which breaks dynamic server_id behavior compatibility. Thus we need a new variable instead, i.e. session_server_id or override_server_id or pseudo_server_id. Setting this variable would require SUPER privileges.
It would have the following values:
- 0 (the default): use the global server_id value. Note that this is different from the global server_id == 0 which disables replication.
- non-zero: binlog events in this session have this server_id value.
https:/
https:/
MariaDB git commit ab8e8f4b2
Blueprint information
- Status:
- Complete
- Approver:
- Laurynas Biveinis
- Priority:
- Medium
- Drafter:
- Laurynas Biveinis
- Direction:
- Approved
- Assignee:
- Sergei Glushchenko
- Definition:
- Approved
- Series goal:
- Accepted for 5.6
- Implementation:
- Implemented
- Milestone target:
- 5.6.26-74.0
- Started by
- Laurynas Biveinis
- Completed by
- Laurynas Biveinis