WL#14189: Replace old terms in CHANGE MASTER TO and START SLAVE params
Affects: Server-8.0 — Status: Complete
# EXECUTIVE SUMMARY This worklog implements aliases for CHANGE MASTER and its parameters and for START REPLICA/SLAVE parameters as well. The alias introduced for CHANGE MASTER is CHANGE REPLICATION SOURCE. Parameters with MASTER in their name get an alias that replaces MASTER with SOURCE. If the old terminology is used, deprecation warnings are emitted. # USER/DEV STORIES As a MySQL admin user I want to issue replication commands that do not contain offensive terms so that I do not get offended by them and/or expose them to other people (e.g., customers of my application built on top of MySQL). # SCOPE This worklog is part of a broader effort to change old terminology across the entire MySQL product line. However, this worklog focuses only on changing the terminology for the following commands/SQL statements: - CHANGE MASTER and its parameters. - START REPLICA parameters names. # LIMITS N/A # REFERENCES - https://mysqlhighavailability.com/mysql-terminology-updates/
FR1. CHANGE REPLICATION SOURCE shall execute 100% the same actions that CHANGE MASTER does. FR2. CHANGE MASTER and CHANGE REPLICATION SOURCE shall accept aliases for all their parameters having MASTER in their names. The alias shall have MASTER replaced by SOURCE. FR2. START REPLICA/SLAVE UNTIL SOURCE_LOG_POS, SOURCE_LOG_FILE shall execute 100% the same actions that START REPLICA UNTIL MASTER_LOG_POS, MASTER_LOG_FILE does. FR3. CHANGE REPLICATION SOURCE statement shall emit one deprecation warning per old term used. This applies to CHANGE MASTER and also its parameters, meaning that "CHANGE MASTER TO MASTER_HOST='...', MASTER_PORT=N" SHALL emit 3 deprecation warnings. FR4. START REPLICA/SLAVE UNTIL shall emit one deprecation warning per old term used.
# SUMMARY OF THE APPROACH - We create aliases for CHANGE MASTER parameters with MASTER in their name. The aliases contain SOURCE instead of MASTER in the name. - We create a new alias for CHANGE MASTER: CHANGE REPLICATION SOURCE. - We create aliases for START REPLICA/SLAVE UNTIL MASTER_LOG_POS and MASTER_LOG_FILE. User can now use SOURCE_LOG_POS and SOURCE_LOG_FILE instead. - We emit deprecation warnings whenever an old term is used. # SECURITY CONTEXT No security implications. # UPGRADE/DOWNGRADE and CROSS-VERSION REPLICATION ## New Statements New statements will be introduced to replace old statements. There are no upgrade/downgrade or cross-version replication implications, except for the fact that statements being replaced will now emit deprecation warnings. # USER INTERFACE ## Alias for old statements - CHANGE MASTER -> CHANGE REPLICATION SOURCE - MASTER_AUTO_POSITION -> SOURCE_AUTO_POSITION - MASTER_HOST -> SOURCE_HOST - MASTER_BIND -> SOURCE_BIND - MASTER_USER -> SOURCE_USER - MASTER_PASSWORD -> SOURCE_PASSWORD - MASTER_PORT -> SOURCE_PORT - MASTER_CONNECT_RETRY -> SOURCE_CONNECT_RETRY - MASTER_RETRY_COUNT -> SOURCE_RETRY_COUNT - MASTER_DELAY -> SOURCE_DELAY - MASTER_SSL -> SOURCE_SSL - MASTER_SSL_CA -> SOURCE_SSL_CA - MASTER_SSL_CAPATH -> SOURCE_SSL_CAPATH - MASTER_SSL_CIPHER -> SOURCE_SSL_CIPHER - MASTER_SSL_CRL -> SOURCE_SSL_CRL - MASTER_SSL_CRLPATH -> SOURCE_SSL_CRLPATH - MASTER_SSL_KEY -> SOURCE_SSL_KEY - MASTER_SSL_VERIFY_SERVER_CERT -> SOURCE_SSL_VERIFY_SERVER_CERT - MASTER_TLS_VERSION -> SOURCE_TLS_VERSION - MASTER_TLS_CIPHERSUITES -> SOURCE_TLS_CIPHERSUITES - MASTER_SSL_CERT -> SOURCE_SSL_CERT - MASTER_PUBLIC_KEY_PATH -> SOURCE_PUBLIC_KEY_PATH - GET_MASTER_PUBLIC_KEY -> GET_SOURCE_PUBLIC_KEY - MASTER_HEARTBEAT_PERIOD -> SOURCE_HEARTBEAT_PERIOD - MASTER_COMPRESSION_ALGORITHM -> SOURCE_COMPRESSION_ALGORITHM - MASTER_ZSTD_COMPRESSION_LEVEL -> SOURCE_ZSTD_COMPRESSION_LEVEL - MASTER_LOG_FILE -> SOURCE_LOG_FILE - MASTER_LOG_POS -> SOURCE_LOG_POS ## Deprecation warnings - Deprecation warnings will be emited when old terminology is used in the CHANGE MASTER/REPLICATION SOURCE and START REPLICA/SLAVE statements. # OBSERVABILITY ## Status Variables Change An alias for the following status variable is introduced. - Com_change_master = Com_change_replication_source This introduces a new status variable. This means that SHOW GLOBAL STATUS shall output one more variable (which is an alias to an existing one). Therefore tools that regularly scan status variables will get a new status var in the result set. Note that NO deprecation warning is emitted when SHOW VARIABLES LIKE 'Com_change_master' is issued, but it will be deprecated in the documentation. ## BUILD, DEPLOY and INSTALL Nothing worth noting. ## PROTOCOL No protocol implications. ## FAILURE MODEL SPECIFICATION No changes to the failure model. ## PERFORMANCE AND EFFICIENCY No performance implication.
# DESIGN IMPLEMENTATION STEPS 1. Change the parser to add an alias for the MASTER symbol when used in the CHANGE MASTER command. 2. Change the parser to add aliases for the parameters of CHANGE MASTER. 3. Deploy deprecation warnings to the parser when using old terms in CHANGE REPLICATION SOURCE and START REPLICA UNTIL. 4. Change the test suite to use the new syntax and thus avoid the deprecation warnings.
Copyright (c) 2000, 2023, Oracle Corporation and/or its affiliates. All rights reserved.