Engine-independent online alter table (MDEV-16329) brings an extra data-modification stage to the COPY alter table – online log changes application.
For the normal copy stage, the row-by-row logging was disabled in MDEV-11415. This can be extended to the online log application.
{"report":{"fcp":909.6999998092651,"ttfb":232,"pageVisibility":"visible","entityId":127031,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"a64119ad-1eb8-4883-8cc7-e1e5e0903675","navigationType":0,"readyForUser":983.6999998092651,"redirectCount":0,"resourceLoadedEnd":1043,"resourceLoadedStart":239.59999990463257,"resourceTiming":[{"duration":157.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":239.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":396.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":157.29999995231628,"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":239.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":397.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":165.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":240,"connectEnd":240,"connectStart":240,"domainLookupEnd":240,"domainLookupStart":240,"fetchStart":240,"redirectEnd":0,"redirectStart":0,"requestStart":240,"responseEnd":405.7999999523163,"responseStart":405.7999999523163,"secureConnectionStart":240},{"duration":247,"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":240.19999980926514,"connectEnd":240.19999980926514,"connectStart":240.19999980926514,"domainLookupEnd":240.19999980926514,"domainLookupStart":240.19999980926514,"fetchStart":240.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":240.19999980926514,"responseEnd":487.19999980926514,"responseStart":487.19999980926514,"secureConnectionStart":240.19999980926514},{"duration":250.29999995231628,"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":240.39999985694885,"connectEnd":240.39999985694885,"connectStart":240.39999985694885,"domainLookupEnd":240.39999985694885,"domainLookupStart":240.39999985694885,"fetchStart":240.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":240.39999985694885,"responseEnd":490.69999980926514,"responseStart":490.69999980926514,"secureConnectionStart":240.39999985694885},{"duration":250.69999980926514,"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":240.5,"connectEnd":240.5,"connectStart":240.5,"domainLookupEnd":240.5,"domainLookupStart":240.5,"fetchStart":240.5,"redirectEnd":0,"redirectStart":0,"requestStart":240.5,"responseEnd":491.19999980926514,"responseStart":491.19999980926514,"secureConnectionStart":240.5},{"duration":250.80000019073486,"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":240.69999980926514,"connectEnd":240.69999980926514,"connectStart":240.69999980926514,"domainLookupEnd":240.69999980926514,"domainLookupStart":240.69999980926514,"fetchStart":240.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":240.69999980926514,"responseEnd":491.5,"responseStart":491.5,"secureConnectionStart":240.69999980926514},{"duration":306.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":240.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":240.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":547.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":250.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":241.09999990463257,"connectEnd":241.09999990463257,"connectStart":241.09999990463257,"domainLookupEnd":241.09999990463257,"domainLookupStart":241.09999990463257,"fetchStart":241.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":241.09999990463257,"responseEnd":492,"responseStart":492,"secureConnectionStart":241.09999990463257},{"duration":306.59999990463257,"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":241.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":241.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":547.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":251.20000004768372,"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":241.39999985694885,"connectEnd":241.39999985694885,"connectStart":241.39999985694885,"domainLookupEnd":241.39999985694885,"domainLookupStart":241.39999985694885,"fetchStart":241.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":241.39999985694885,"responseEnd":492.59999990463257,"responseStart":492.59999990463257,"secureConnectionStart":241.39999985694885},{"duration":423.59999990463257,"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":247,"connectEnd":247,"connectStart":247,"domainLookupEnd":247,"domainLookupStart":247,"fetchStart":247,"redirectEnd":0,"redirectStart":0,"requestStart":247,"responseEnd":670.5999999046326,"responseStart":670.5999999046326,"secureConnectionStart":247},{"duration":791.7000000476837,"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":251.29999995231628,"connectEnd":251.29999995231628,"connectStart":251.29999995231628,"domainLookupEnd":251.29999995231628,"domainLookupStart":251.29999995231628,"fetchStart":251.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":251.29999995231628,"responseEnd":1043,"responseStart":1043,"secureConnectionStart":251.29999995231628},{"duration":111.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":559.0999999046326,"connectEnd":559.0999999046326,"connectStart":559.0999999046326,"domainLookupEnd":559.0999999046326,"domainLookupStart":559.0999999046326,"fetchStart":559.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":559.0999999046326,"responseEnd":671,"responseStart":671,"secureConnectionStart":559.0999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":35,"responseStart":232,"responseEnd":251,"domLoading":236,"domInteractive":1068,"domContentLoadedEventStart":1068,"domContentLoadedEventEnd":1108,"domComplete":1444,"loadEventStart":1444,"loadEventEnd":1445,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1044.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1045.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1045.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1047.2999999523163},{"name":"activityTabFullyLoaded","time":1120.6999998092651}],"measures":[],"correlationId":"adccb77892abad","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Row-by-row logging is enabled for CREATE...SELECT in select_create::prepare.
But it's turned off for IGNORE and REPLACE
table->file->extra(HA_EXTRA_BEGIN_ALTER_COPY);
git show c411393a844becf91a560ac8e53ab04cb4fb9219
commit c411393a844becf91a560ac8e53ab04cb4fb9219
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date: Thu Jan 28 15:26:53 2021 +0200
MDEV-24715 Assertion !node->table->skip_alter_undo in CREATE...REPLACE SELECT
In commit 3cef4f8f0fc88ae5bfae4603d8d600ec84cc70a9 (MDEV-515)
we inadvertently broke CREATE TABLE...REPLACE SELECT statements
by wrongly disabling row-level undo logging.
select_create::prepare(): Only invoke extra(HA_EXTRA_BEGIN_ALTER_COPY)
if no special treatment of duplicates is needed.
REPLACE operation has a special treatment in comparison with UPDATE and DELETE – it needs row-grained logging to carefully rollback the failed row insertion inside the statement. In comparison, this would lead to a statement failure in INSERT/UPDATE/DELETE/CREATE...SELECT/ALTER TABLE.
Online ALTER does not allow the replace behavior for the online log application (neither it does for the copy stage as of now), so it should be safe