Using the following test case, the second INSERT statement is not logged in the binlog when using MIXED binlog format and thus is not replicated to a slave, leading to inconsistent state of replication.
Server version: 10.3.34-MariaDB-log MariaDB Server
CREATE TABLE t1 (
|
id INT PRIMARY KEY AUTO_INCREMENT,
|
a INT,
|
b INT,
|
c INT,
|
UNIQUE (a),
|
UNIQUE (b)
|
);
|
|
INSERT INTO t1 (`a`,`c`) VALUES (1,1), (2,1) ON DUPLICATE KEY UPDATE c = 1;
|
INSERT INTO t1 (`a`,`c`) VALUES (3, 1),(2,1), (1,1) ON DUPLICATE KEY UPDATE c = 1;
|
{"report":{"fcp":938.8000001907349,"ttfb":342,"pageVisibility":"visible","entityId":109892,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"c317421d-affb-412f-88a8-e2335a80879c","navigationType":0,"readyForUser":1001,"redirectCount":0,"resourceLoadedEnd":752.9000000953674,"resourceLoadedStart":350.10000014305115,"resourceTiming":[{"duration":94.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":350.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":350.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.5,"responseStart":0,"secureConnectionStart":0},{"duration":95.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":350.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":350.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":445.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":142.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":350.30000019073486,"connectEnd":350.30000019073486,"connectStart":350.30000019073486,"domainLookupEnd":350.30000019073486,"domainLookupStart":350.30000019073486,"fetchStart":350.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":449.2000000476837,"responseEnd":492.5,"responseStart":463.10000014305115,"secureConnectionStart":350.30000019073486},{"duration":155.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":350.40000009536743,"connectEnd":350.40000009536743,"connectStart":350.40000009536743,"domainLookupEnd":350.40000009536743,"domainLookupStart":350.40000009536743,"fetchStart":350.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":449.80000019073486,"responseEnd":505.7000000476837,"responseStart":462.40000009536743,"secureConnectionStart":350.40000009536743},{"duration":118,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":350.5,"connectEnd":350.5,"connectStart":350.5,"domainLookupEnd":350.5,"domainLookupStart":350.5,"fetchStart":350.5,"redirectEnd":0,"redirectStart":0,"requestStart":452,"responseEnd":468.5,"responseStart":467.80000019073486,"secureConnectionStart":350.5},{"duration":124.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":350.60000014305115,"connectEnd":350.60000014305115,"connectStart":350.60000014305115,"domainLookupEnd":350.60000014305115,"domainLookupStart":350.60000014305115,"fetchStart":350.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":452.60000014305115,"responseEnd":475.40000009536743,"responseStart":474.7000000476837,"secureConnectionStart":350.60000014305115},{"duration":127.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":350.7000000476837,"connectEnd":350.7000000476837,"connectStart":350.7000000476837,"domainLookupEnd":350.7000000476837,"domainLookupStart":350.7000000476837,"fetchStart":350.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":456,"responseEnd":478.5,"responseStart":477.90000009536743,"secureConnectionStart":350.7000000476837},{"duration":102.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":350.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":350.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":453.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":105,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":351,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":351,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":456,"responseStart":0,"secureConnectionStart":0},{"duration":123.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":351,"connectEnd":461.90000009536743,"connectStart":461.90000009536743,"domainLookupEnd":461.90000009536743,"domainLookupStart":461.90000009536743,"fetchStart":351,"redirectEnd":0,"redirectStart":0,"requestStart":462.10000014305115,"responseEnd":474.5,"responseStart":473.10000014305115,"secureConnectionStart":461.90000009536743},{"duration":138.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":351.2000000476837,"connectEnd":351.2000000476837,"connectStart":351.2000000476837,"domainLookupEnd":351.2000000476837,"domainLookupStart":351.2000000476837,"fetchStart":351.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":474.30000019073486,"responseEnd":489.80000019073486,"responseStart":488,"secureConnectionStart":351.2000000476837},{"duration":386.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":358.5,"connectEnd":358.5,"connectStart":358.5,"domainLookupEnd":358.5,"domainLookupStart":358.5,"fetchStart":358.5,"redirectEnd":0,"redirectStart":0,"requestStart":609.7000000476837,"responseEnd":744.9000000953674,"responseStart":742.1000001430511,"secureConnectionStart":358.5},{"duration":393.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":359.30000019073486,"connectEnd":359.30000019073486,"connectStart":359.30000019073486,"domainLookupEnd":359.30000019073486,"domainLookupStart":359.30000019073486,"fetchStart":359.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":738.3000001907349,"responseEnd":752.9000000953674,"responseStart":751.6000001430511,"secureConnectionStart":359.30000019073486},{"duration":185.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":687.9000000953674,"connectEnd":687.9000000953674,"connectStart":687.9000000953674,"domainLookupEnd":687.9000000953674,"domainLookupStart":687.9000000953674,"fetchStart":687.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":841.9000000953674,"responseEnd":873.7000000476837,"responseStart":872.9000000953674,"secureConnectionStart":687.9000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":206,"responseStart":342,"responseEnd":359,"domLoading":346,"domInteractive":1056,"domContentLoadedEventStart":1056,"domContentLoadedEventEnd":1098,"domComplete":1928,"loadEventStart":1928,"loadEventEnd":1928,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1036.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1037.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1037.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1038.8000001907349},{"name":"activityTabFullyLoaded","time":1114.7000000476837}],"measures":[],"correlationId":"4616bb8c97d6e6","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":78,"dbReadsTimeInMs":14,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I checked 10.6 and there both statements are replicated properly with binlog_format=mixed
In 10.2 it does not. Probably related to the (wrong) warning that we get in 10.2