Type:
Bug
Priority:
Minor
Resolution:
Fixed
Affects Version/s:
10.0.2 , 5.5.30 , 5.1.67 , 5.2.14 , 5.3.12
Component/s:
None
in SBR mode mysqlbinlog prints the original query string, with the C API it's easy to generate INSERT statement that contains \0 or some other binary data, and that will break mysqlbinlog|mysql restore.
See also the linked MySQL bug,
Fix: mysqlbinlog should replace binary strings with their hexadecimal representation.
relates to
MDEV-4297
mysql --binary-mode
Closed
links to
{"report":{"fcp":1266.2000000476837,"ttfb":463.60000014305115,"pageVisibility":"visible","entityId":23230,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"220b5e0d-ed63-4804-9654-e7bea881c221","navigationType":0,"readyForUser":1337.3000001907349,"redirectCount":0,"resourceLoadedEnd":985.4000000953674,"resourceLoadedStart":472.10000014305115,"resourceTiming":[{"duration":48.299999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":472.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":472.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":520.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":58.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":472.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":472.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":374.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":472.40000009536743,"connectEnd":472.40000009536743,"connectStart":472.40000009536743,"domainLookupEnd":472.40000009536743,"domainLookupStart":472.40000009536743,"fetchStart":472.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":538,"responseEnd":846.6000001430511,"responseStart":578.3000001907349,"secureConnectionStart":472.40000009536743},{"duration":512.9000000953674,"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":472.5,"connectEnd":472.5,"connectStart":472.5,"domainLookupEnd":472.5,"domainLookupStart":472.5,"fetchStart":472.5,"redirectEnd":0,"redirectStart":0,"requestStart":538.5,"responseEnd":985.4000000953674,"responseStart":614.2000000476837,"secureConnectionStart":472.5},{"duration":113.40000009536743,"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":472.7000000476837,"connectEnd":472.7000000476837,"connectStart":472.7000000476837,"domainLookupEnd":472.7000000476837,"domainLookupStart":472.7000000476837,"fetchStart":472.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":538.7000000476837,"responseEnd":586.1000001430511,"responseStart":583.6000001430511,"secureConnectionStart":472.7000000476837},{"duration":116.40000009536743,"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":472.7000000476837,"connectEnd":472.7000000476837,"connectStart":472.7000000476837,"domainLookupEnd":472.7000000476837,"domainLookupStart":472.7000000476837,"fetchStart":472.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":539.1000001430511,"responseEnd":589.1000001430511,"responseStart":584.7000000476837,"secureConnectionStart":472.7000000476837},{"duration":116.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":472.80000019073486,"connectEnd":472.80000019073486,"connectStart":472.80000019073486,"domainLookupEnd":472.80000019073486,"domainLookupStart":472.80000019073486,"fetchStart":472.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":539.2000000476837,"responseEnd":589.6000001430511,"responseStart":586.2000000476837,"secureConnectionStart":472.80000019073486},{"duration":61.700000047683716,"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":472.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":472.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":534.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":116.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":472.90000009536743,"connectEnd":472.90000009536743,"connectStart":472.90000009536743,"domainLookupEnd":472.90000009536743,"domainLookupStart":472.90000009536743,"fetchStart":472.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":539.3000001907349,"responseEnd":589.8000001907349,"responseStart":586.8000001907349,"secureConnectionStart":472.90000009536743},{"duration":62,"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":473,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":473,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":535,"responseStart":0,"secureConnectionStart":0},{"duration":116.89999985694885,"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":473.10000014305115,"connectEnd":473.10000014305115,"connectStart":473.10000014305115,"domainLookupEnd":473.10000014305115,"domainLookupStart":473.10000014305115,"fetchStart":473.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":539.5,"responseEnd":590,"responseStart":587.3000001907349,"secureConnectionStart":473.10000014305115},{"duration":507.2999999523163,"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":474.30000019073486,"connectEnd":474.30000019073486,"connectStart":474.30000019073486,"domainLookupEnd":474.30000019073486,"domainLookupStart":474.30000019073486,"fetchStart":474.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":599,"responseEnd":981.6000001430511,"responseStart":974.8000001907349,"secureConnectionStart":474.30000019073486},{"duration":507.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":474.30000019073486,"connectEnd":474.30000019073486,"connectStart":474.30000019073486,"domainLookupEnd":474.30000019073486,"domainLookupStart":474.30000019073486,"fetchStart":474.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":649.7000000476837,"responseEnd":981.9000000953674,"responseStart":977.4000000953674,"secureConnectionStart":474.30000019073486},{"duration":149,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":979.2000000476837,"connectEnd":979.2000000476837,"connectStart":979.2000000476837,"domainLookupEnd":979.2000000476837,"domainLookupStart":979.2000000476837,"fetchStart":979.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1089.4000000953674,"responseEnd":1128.2000000476837,"responseStart":1126.9000000953674,"secureConnectionStart":979.2000000476837},{"duration":185.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1218.7000000476837,"connectEnd":1218.7000000476837,"connectStart":1218.7000000476837,"domainLookupEnd":1218.7000000476837,"domainLookupStart":1218.7000000476837,"fetchStart":1218.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1375.3000001907349,"responseEnd":1404.2000000476837,"responseStart":1403.1000001430511,"secureConnectionStart":1218.7000000476837},{"duration":187.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1258.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1258.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1446.6000001430511,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":57,"responseStart":463,"responseEnd":469,"domLoading":470,"domInteractive":1433,"domContentLoadedEventStart":1433,"domContentLoadedEventEnd":1478,"domComplete":1837,"loadEventStart":1837,"loadEventEnd":1838,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1407},{"name":"bigPipe.sidebar-id.end","time":1408.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":1408.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1409.7000000476837},{"name":"activityTabFullyLoaded","time":1498.3000001907349}],"measures":[],"correlationId":"5c3e82b8b7bb9e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":325,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
this can be fixed in the mysqlbinlog — by escaping problematic characters (bad, doesn't always work with multi-byte eastern charsets), or by replacing the complete string literal with the hex notation (doesn't work for identifiers).
this can be fixed in the mysql client — by not treating problematic characters specially, when loading from a file (breaks loading sql dumps created on windows), or with a special "binary" mode (upstream fix).
Or, perhaps, in both — binary mode in the mysql client, a \B command to enable it, and mysqlbinlog putting \B in all dumps. At least the user won't need to remember the binary mode, unless she wants to apply only a part of the dump.