Type:
Task
Priority:
Critical
Resolution:
Fixed
MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax
describe
For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
"FOR CHANNEL" is just an alias for connection_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
(MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
(MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
The channel name supports up to 64 bytes, and is not case sensitive
The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE
new syntax for MariaDB
CHANGE MASTER
CHANGE MASTER [ 'connection_name' ] TO master_def [, master_def] ... [FOR CHANNEL 'connection_name' ]
FLUSH RELAY LOG
FLUSH RELAY LOGS [ 'connection_name' | FOR CHANNEL 'connection_name' ]
RESET SLAVE
RESET SLAVE [ 'connection_name' ] [ALL] [FOR CHANNEL 'connection_name' ]
SHOW RELAY LOG EVENT
SHOW RELAYLOG [ 'connection_name' ] EVENTS [IN 'log_name' ] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'connection_name' ]
SHOW SLAVE STATUS
SHOW SLAVE [ 'connection_name' ] STATUS [FOR CHANNEL 'connection_name' ]
START SLAVE
START SLAVE [ 'connection_name' ] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name' ]
STOP SLAVE
STOP SLAVE [ 'connection_name' ] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name' ]
relates to
MDEV-23912
Orphan files left after failed relay log initialization (multi-source replication)
Open
{"report":{"fcp":822.9000000953674,"ttfb":165,"pageVisibility":"visible","entityId":101767,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"2eb2553f-da2e-435c-a08d-127b1969baa4","navigationType":0,"readyForUser":908.5999999046326,"redirectCount":0,"resourceLoadedEnd":969.2999997138977,"resourceLoadedStart":170.2999997138977,"resourceTiming":[{"duration":122.10000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":170.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":292.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":122.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":170.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":292.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":131.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":170.69999980926514,"connectEnd":170.69999980926514,"connectStart":170.69999980926514,"domainLookupEnd":170.69999980926514,"domainLookupStart":170.69999980926514,"fetchStart":170.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":170.69999980926514,"responseEnd":302.19999980926514,"responseStart":302.19999980926514,"secureConnectionStart":170.69999980926514},{"duration":199.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":170.90000009536743,"connectEnd":170.90000009536743,"connectStart":170.90000009536743,"domainLookupEnd":170.90000009536743,"domainLookupStart":170.90000009536743,"fetchStart":170.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":170.90000009536743,"responseEnd":370.7999997138977,"responseStart":370.7999997138977,"secureConnectionStart":170.90000009536743},{"duration":203.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":171.19999980926514,"connectEnd":171.19999980926514,"connectStart":171.19999980926514,"domainLookupEnd":171.19999980926514,"domainLookupStart":171.19999980926514,"fetchStart":171.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":171.19999980926514,"responseEnd":374.69999980926514,"responseStart":374.69999980926514,"secureConnectionStart":171.19999980926514},{"duration":203.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":171.2999997138977,"connectEnd":171.2999997138977,"connectStart":171.2999997138977,"domainLookupEnd":171.2999997138977,"domainLookupStart":171.2999997138977,"fetchStart":171.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":171.2999997138977,"responseEnd":375.19999980926514,"responseStart":375.19999980926514,"secureConnectionStart":171.2999997138977},{"duration":204,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":171.5,"connectEnd":171.5,"connectStart":171.5,"domainLookupEnd":171.5,"domainLookupStart":171.5,"fetchStart":171.5,"redirectEnd":0,"redirectStart":0,"requestStart":171.5,"responseEnd":375.5,"responseStart":375.5,"secureConnectionStart":171.5},{"duration":272.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":171.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":204,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":171.90000009536743,"connectEnd":171.90000009536743,"connectStart":171.90000009536743,"domainLookupEnd":171.90000009536743,"domainLookupStart":171.90000009536743,"fetchStart":171.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":171.90000009536743,"responseEnd":375.90000009536743,"responseStart":375.90000009536743,"secureConnectionStart":171.90000009536743},{"duration":272.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":172,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":204.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":172.09999990463257,"connectEnd":172.09999990463257,"connectStart":172.09999990463257,"domainLookupEnd":172.09999990463257,"domainLookupStart":172.09999990463257,"fetchStart":172.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":172.09999990463257,"responseEnd":376.40000009536743,"responseStart":376.40000009536743,"secureConnectionStart":172.09999990463257},{"duration":793.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":173.09999990463257,"connectEnd":173.09999990463257,"connectStart":173.09999990463257,"domainLookupEnd":173.09999990463257,"domainLookupStart":173.09999990463257,"fetchStart":173.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":173.09999990463257,"responseEnd":966.5999999046326,"responseStart":966.5999999046326,"secureConnectionStart":173.09999990463257},{"duration":794.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":173.09999990463257,"connectEnd":173.09999990463257,"connectStart":173.09999990463257,"domainLookupEnd":173.09999990463257,"domainLookupStart":173.09999990463257,"fetchStart":173.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":173.09999990463257,"responseEnd":967.7999997138977,"responseStart":967.7999997138977,"secureConnectionStart":173.09999990463257},{"duration":170.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":456.40000009536743,"connectEnd":456.40000009536743,"connectStart":456.40000009536743,"domainLookupEnd":456.40000009536743,"domainLookupStart":456.40000009536743,"fetchStart":456.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":456.40000009536743,"responseEnd":627.1999998092651,"responseStart":627.1999998092651,"secureConnectionStart":456.40000009536743},{"duration":251.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":717.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":717.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":969.2999997138977,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":4,"responseStart":165,"responseEnd":168,"domLoading":168,"domInteractive":989,"domContentLoadedEventStart":989,"domContentLoadedEventEnd":1028,"domComplete":2620,"loadEventStart":2620,"loadEventEnd":2622,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":972.5999999046326},{"name":"bigPipe.sidebar-id.end","time":973.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":973.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":976.0999999046326},{"name":"activityTabFullyLoaded","time":1035.2999997138977}],"measures":[],"correlationId":"903d79978c2403","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}