Summary
The replication-management vocabulary was renamed across MySQL 8.0.23 → 8.4. The old CHANGE MASTER TO / RESET MASTER / START SLAVE family is removed in 8.4 LTS; the new CHANGE REPLICATION SOURCE TO / RESET BINARY LOGS AND GTIDS / START REPLICA family is now the only accepted form. Marino does not parse most of the new statements.
MySQL versions
- 8.0.23 —
CHANGE REPLICATION SOURCE TO
- 8.0.22+ —
START/STOP/RESET REPLICA
- 8.2.0 —
RESET BINARY LOGS AND GTIDS, SHOW BINARY LOGS, SHOW BINARY LOG STATUS, PURGE BINARY LOGS, DISABLE ON REPLICA for events
Current state in marino
| Statement |
Status |
SHOW BINARY LOG STATUS |
already supported (parser/parser.y:12190-12203) |
SHOW REPLICA STATUS |
already supported (parser/parser.y:12204-12209) |
CHANGE REPLICATION SOURCE TO ... |
not supported |
RESET REPLICA [ALL] |
not supported |
START REPLICA / STOP REPLICA |
not supported |
RESET BINARY LOGS AND GTIDS |
not supported |
SHOW BINARY LOGS |
not supported |
PURGE BINARY LOGS BEFORE/TO |
not supported (only PURGE BACKUP LOGS is at parser.y:6066) |
CREATE/ALTER EVENT ... DISABLE ON REPLICA |
not supported (no disable_on_replica token) |
Example SQL
CHANGE REPLICATION SOURCE TO
SOURCE_HOST = 'primary.example',
SOURCE_USER = 'repl',
SOURCE_PASSWORD= 'repl_pw',
SOURCE_PORT = 3306,
SOURCE_AUTO_POSITION = 1;
START REPLICA;
STOP REPLICA;
START REPLICA SQL_THREAD UNTIL SQL_AFTER_GTIDS = 'aaa-bbb:1-100';
RESET REPLICA ALL;
SHOW BINARY LOGS;
SHOW BINARY LOG STATUS;
PURGE BINARY LOGS BEFORE '2024-01-01 00:00:00';
PURGE BINARY LOGS TO 'binlog.000123';
RESET BINARY LOGS AND GTIDS;
CREATE EVENT ev_demo
ON SCHEDULE EVERY 1 HOUR
DISABLE ON REPLICA
DO SELECT 1;
ALTER EVENT ev_demo DISABLE ON REPLICA;
Validation
All statements above parse and execute successfully against MySQL 9.2.0 Community.
Notes for the implementer
- Extend the keywords table with
REPLICA, SOURCE, GTIDS, BINLOG (already partial), THREAD, etc., where missing.
- Add new AST nodes:
ChangeReplicationSourceStmt, StartReplicaStmt, StopReplicaStmt, ResetReplicaStmt, ResetBinaryLogsAndGtidsStmt, ShowBinaryLogsStmt, PurgeBinaryLogsStmt. The legacy Slave/Master-named nodes can stay as aliases for compatibility.
- Add
DISABLE ON REPLICA (alongside the existing DISABLE ON SLAVE if any) as a value for the event-status enum.
- The full option list for
CHANGE REPLICATION SOURCE TO is large; mirror the upstream grammar at https://dev.mysql.com/doc/refman/9.2/en/change-replication-source-to.html.
Summary
The replication-management vocabulary was renamed across MySQL 8.0.23 → 8.4. The old
CHANGE MASTER TO/RESET MASTER/START SLAVEfamily is removed in 8.4 LTS; the newCHANGE REPLICATION SOURCE TO/RESET BINARY LOGS AND GTIDS/START REPLICAfamily is now the only accepted form. Marino does not parse most of the new statements.MySQL versions
CHANGE REPLICATION SOURCE TOSTART/STOP/RESET REPLICARESET BINARY LOGS AND GTIDS,SHOW BINARY LOGS,SHOW BINARY LOG STATUS,PURGE BINARY LOGS,DISABLE ON REPLICAfor eventsCurrent state in marino
SHOW BINARY LOG STATUSparser/parser.y:12190-12203)SHOW REPLICA STATUSparser/parser.y:12204-12209)CHANGE REPLICATION SOURCE TO ...RESET REPLICA [ALL]START REPLICA/STOP REPLICARESET BINARY LOGS AND GTIDSSHOW BINARY LOGSPURGE BINARY LOGS BEFORE/TOPURGE BACKUP LOGSis atparser.y:6066)CREATE/ALTER EVENT ... DISABLE ON REPLICAdisable_on_replicatoken)Example SQL
Validation
All statements above parse and execute successfully against MySQL 9.2.0 Community.
Notes for the implementer
REPLICA,SOURCE,GTIDS,BINLOG(already partial),THREAD, etc., where missing.ChangeReplicationSourceStmt,StartReplicaStmt,StopReplicaStmt,ResetReplicaStmt,ResetBinaryLogsAndGtidsStmt,ShowBinaryLogsStmt,PurgeBinaryLogsStmt. The legacySlave/Master-named nodes can stay as aliases for compatibility.DISABLE ON REPLICA(alongside the existingDISABLE ON SLAVEif any) as a value for the event-status enum.CHANGE REPLICATION SOURCE TOis large; mirror the upstream grammar at https://dev.mysql.com/doc/refman/9.2/en/change-replication-source-to.html.