CHANGE MASTER sets @@global.relay_log_purge true or false as needed depending
on whether RELAY_LOG_FILE and/or RELAY_LOG_POS is used in the command.
However, with multi-source, this is changed globally, not per-master. This
means that one CHANGE MASTER command can overwrite the value for
another. Thus, we may purge relay logs needed by a different master
connection, or leave dangling relay logs for one that does not need them.
It seems that @@global.relay_log_purge needs to become a per-master-connection
value.
The following test case demonstrates this; mtr will warn that the global
relay_log_purge value changed even though we manipulated only the 'abc' master connection.
--source include/not_embedded.inc
|
--source include/have_innodb.inc
|
--error ER_RELAY_LOG_INIT
|
change master 'abc' to relay_log_file='';
|
{"report":{"fcp":1500.0999999046326,"ttfb":544.5999999046326,"pageVisibility":"visible","entityId":22755,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"062db65e-dbde-4a19-a5c8-0a848abb8d9d","navigationType":0,"readyForUser":1588,"redirectCount":0,"resourceLoadedEnd":1754.4000000953674,"resourceLoadedStart":587.9000000953674,"resourceTiming":[{"duration":407.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":587.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":587.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":995.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":407.2000002861023,"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":588.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":588.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":995.5,"responseStart":0,"secureConnectionStart":0},{"duration":415.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":588.4000000953674,"connectEnd":588.4000000953674,"connectStart":588.4000000953674,"domainLookupEnd":588.4000000953674,"domainLookupStart":588.4000000953674,"fetchStart":588.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":588.4000000953674,"responseEnd":1004.1999998092651,"responseStart":1004.1999998092651,"secureConnectionStart":588.4000000953674},{"duration":514,"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":588.5999999046326,"connectEnd":588.5999999046326,"connectStart":588.5999999046326,"domainLookupEnd":588.5999999046326,"domainLookupStart":588.5999999046326,"fetchStart":588.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":588.5999999046326,"responseEnd":1102.5999999046326,"responseStart":1102.5999999046326,"secureConnectionStart":588.5999999046326},{"duration":518.2000002861023,"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":588.7999997138977,"connectEnd":588.7999997138977,"connectStart":588.7999997138977,"domainLookupEnd":588.7999997138977,"domainLookupStart":588.7999997138977,"fetchStart":588.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":588.7999997138977,"responseEnd":1107,"responseStart":1107,"secureConnectionStart":588.7999997138977},{"duration":518.9000000953674,"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":589.0999999046326,"connectEnd":589.0999999046326,"connectStart":589.0999999046326,"domainLookupEnd":589.0999999046326,"domainLookupStart":589.0999999046326,"fetchStart":589.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":589.0999999046326,"responseEnd":1108,"responseStart":1108,"secureConnectionStart":589.0999999046326},{"duration":519.7000002861023,"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":589.1999998092651,"connectEnd":589.1999998092651,"connectStart":589.1999998092651,"domainLookupEnd":589.1999998092651,"domainLookupStart":589.1999998092651,"fetchStart":589.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":589.1999998092651,"responseEnd":1108.9000000953674,"responseStart":1108.9000000953674,"secureConnectionStart":589.1999998092651},{"duration":570.7999997138977,"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":589.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":589.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1160.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":520.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":589.5,"connectEnd":589.5,"connectStart":589.5,"domainLookupEnd":589.5,"domainLookupStart":589.5,"fetchStart":589.5,"redirectEnd":0,"redirectStart":0,"requestStart":589.5,"responseEnd":1109.9000000953674,"responseStart":1109.9000000953674,"secureConnectionStart":589.5},{"duration":570.9000000953674,"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":589.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":589.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1160.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":521,"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":589.9000000953674,"connectEnd":589.9000000953674,"connectStart":589.9000000953674,"domainLookupEnd":589.9000000953674,"domainLookupStart":589.9000000953674,"fetchStart":589.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":589.9000000953674,"responseEnd":1110.9000000953674,"responseStart":1110.7999997138977,"secureConnectionStart":589.9000000953674},{"duration":1154.5999999046326,"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":590.5999999046326,"connectEnd":590.5999999046326,"connectStart":590.5999999046326,"domainLookupEnd":590.5999999046326,"domainLookupStart":590.5999999046326,"fetchStart":590.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":590.5999999046326,"responseEnd":1745.1999998092651,"responseStart":1745.1999998092651,"secureConnectionStart":590.5999999046326},{"duration":1163.7000002861023,"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":590.6999998092651,"connectEnd":590.6999998092651,"connectStart":590.6999998092651,"domainLookupEnd":590.6999998092651,"domainLookupStart":590.6999998092651,"fetchStart":590.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":590.6999998092651,"responseEnd":1754.4000000953674,"responseStart":1754.4000000953674,"secureConnectionStart":590.6999998092651},{"duration":572.5999999046326,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1175.4000000953674,"connectEnd":1175.4000000953674,"connectStart":1175.4000000953674,"domainLookupEnd":1175.4000000953674,"domainLookupStart":1175.4000000953674,"fetchStart":1175.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1175.4000000953674,"responseEnd":1748,"responseStart":1748,"secureConnectionStart":1175.4000000953674},{"duration":271.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1491.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1491.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1762.7999997138977,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":42,"responseStart":544,"responseEnd":585,"domLoading":561,"domInteractive":1861,"domContentLoadedEventStart":1861,"domContentLoadedEventEnd":1905,"domComplete":2470,"loadEventStart":2470,"loadEventEnd":2471,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1848},{"name":"bigPipe.sidebar-id.end","time":1848.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":1849},{"name":"bigPipe.activity-panel-pipe-id.end","time":1850.0999999046326},{"name":"activityTabFullyLoaded","time":1919.2999997138977}],"measures":[],"correlationId":"87172838c46696","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":419,"dbReadsTimeInMs":9,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
There is no reason to change relay_log_purge as part of CHANGE MASTER.
This is an unwanted side effect that in all like hood the DB didn't want.
I will fix is so that in 10.0 CHANGE MASTER does not change the global variable RELAY_LOG_PURGE anymore. This will fix this issue.