The test ported from MDEV-32738 hangs as ALTER INPLACE is unable to abort a DML INSERT operation:
--connect con1_1,127.0.0.1,root,,test,$NODE_MYPORT_1
|
--connect con1_2,127.0.0.1,root,,test,$NODE_MYPORT_1
|
|
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1_fk(c1 INT PRIMARY KEY, c2 INT, INDEX (c2), FOREIGN KEY (c2) REFERENCES t1(c1)) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1);
|
|
--connection con1_1
|
SET DEBUG_SYNC = 'ib_after_row_insert WAIT_FOR bf_abort';
|
# INSERT also grabs FK-referenced table lock.
|
--send
|
INSERT INTO t1_fk VALUES (1, 1);
|
|
--connection con1_2
|
SET DEBUG_SYNC = 'ha_write_row_start SIGNAL may_alter WAIT_FOR may_insert';
|
# Stop before doing anything, but pass wsrep_sync_wait().
|
# This should be done before ALTER enters TOI.
|
--send
|
INSERT INTO t1_fk VALUES (2, 2);
|
|
--connection node_1
|
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'lock_wait_before_suspend SIGNAL may_insert WAIT_FOR alter_continue';
|
# ALTER BF-aborts the first INSERT and lets the second INSERT continue.
|
--send
|
ALTER TABLE t1 ADD COLUMN c2 INT;
|
|
--connection con1_1
|
# First INSERT gets BF-aborted.
|
--error ER_LOCK_DEADLOCK
|
--reap
|
|
--connection con1_2
|
# Second INSERT rolls back as ALTER is waiting on the lock.
|
--error ER_LOCK_DEADLOCK
|
--reap
|
SET DEBUG_SYNC = 'now SIGNAL alter_continue';
|
|
--connection node_1
|
# ALTER succeeds.
|
--reap
|
The reason is that ALTER's InnoDB trx has is_wsrep() == false. That might be because trx initialization has been moved to the ctor of ha_innobase_inplace_ctx() which is now done earlier in prepare_inplace_alter_table().
{"report":{"fcp":609.0999999046326,"ttfb":132.89999985694885,"pageVisibility":"visible","entityId":126993,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"5b4c25ef-2aaa-4a73-a4f2-7dadf04fd803","navigationType":0,"readyForUser":670.5,"redirectCount":0,"resourceLoadedEnd":634.7000000476837,"resourceLoadedStart":138.5,"resourceTiming":[{"duration":7.099999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":138.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":138.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":145.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":7,"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":138.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":138.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":145.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":63.299999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":138.79999995231628,"connectEnd":138.79999995231628,"connectStart":138.79999995231628,"domainLookupEnd":138.79999995231628,"domainLookupStart":138.79999995231628,"fetchStart":138.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":138.79999995231628,"responseEnd":202.09999990463257,"responseStart":202.09999990463257,"secureConnectionStart":138.79999995231628},{"duration":140.60000014305115,"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":138.89999985694885,"connectEnd":138.89999985694885,"connectStart":138.89999985694885,"domainLookupEnd":138.89999985694885,"domainLookupStart":138.89999985694885,"fetchStart":138.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":138.89999985694885,"responseEnd":279.5,"responseStart":279.5,"secureConnectionStart":138.89999985694885},{"duration":144,"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":139.09999990463257,"connectEnd":139.09999990463257,"connectStart":139.09999990463257,"domainLookupEnd":139.09999990463257,"domainLookupStart":139.09999990463257,"fetchStart":139.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":139.09999990463257,"responseEnd":283.09999990463257,"responseStart":283.09999990463257,"secureConnectionStart":139.09999990463257},{"duration":145.09999990463257,"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":139.20000004768372,"connectEnd":139.20000004768372,"connectStart":139.20000004768372,"domainLookupEnd":139.20000004768372,"domainLookupStart":139.20000004768372,"fetchStart":139.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":139.20000004768372,"responseEnd":284.2999999523163,"responseStart":284.2999999523163,"secureConnectionStart":139.20000004768372},{"duration":144.59999990463257,"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":139.20000004768372,"connectEnd":139.20000004768372,"connectStart":139.20000004768372,"domainLookupEnd":139.20000004768372,"domainLookupStart":139.20000004768372,"fetchStart":139.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":139.20000004768372,"responseEnd":283.7999999523163,"responseStart":283.7999999523163,"secureConnectionStart":139.20000004768372},{"duration":145.30000019073486,"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":139.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":139.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":145.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":139.5,"connectEnd":139.5,"connectStart":139.5,"domainLookupEnd":139.5,"domainLookupStart":139.5,"fetchStart":139.5,"redirectEnd":0,"redirectStart":0,"requestStart":139.5,"responseEnd":284.7000000476837,"responseStart":284.7000000476837,"secureConnectionStart":139.5},{"duration":145.69999980926514,"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":139.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":139.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":285.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":145.79999995231628,"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":139.70000004768372,"connectEnd":139.70000004768372,"connectStart":139.70000004768372,"domainLookupEnd":139.70000004768372,"domainLookupStart":139.70000004768372,"fetchStart":139.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":139.70000004768372,"responseEnd":285.5,"responseStart":285.5,"secureConnectionStart":139.70000004768372},{"duration":486.2000000476837,"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":140.5,"connectEnd":140.5,"connectStart":140.5,"domainLookupEnd":140.5,"domainLookupStart":140.5,"fetchStart":140.5,"redirectEnd":0,"redirectStart":0,"requestStart":140.5,"responseEnd":626.7000000476837,"responseStart":626.7000000476837,"secureConnectionStart":140.5},{"duration":494.10000014305115,"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":140.59999990463257,"connectEnd":140.59999990463257,"connectStart":140.59999990463257,"domainLookupEnd":140.59999990463257,"domainLookupStart":140.59999990463257,"fetchStart":140.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":140.59999990463257,"responseEnd":634.7000000476837,"responseStart":634.7000000476837,"secureConnectionStart":140.59999990463257},{"duration":214.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":415.59999990463257,"connectEnd":415.59999990463257,"connectStart":415.59999990463257,"domainLookupEnd":415.59999990463257,"domainLookupStart":415.59999990463257,"fetchStart":415.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":415.59999990463257,"responseEnd":629.7999999523163,"responseStart":629.7999999523163,"secureConnectionStart":415.59999990463257},{"duration":49.799999952316284,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":588.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":588.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":638,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":133,"responseEnd":135,"domLoading":136,"domInteractive":781,"domContentLoadedEventStart":781,"domContentLoadedEventEnd":822,"domComplete":1731,"loadEventStart":1731,"loadEventEnd":1733,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":763.3999998569489},{"name":"bigPipe.sidebar-id.end","time":764.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":764.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":766.5999999046326},{"name":"activityTabFullyLoaded","time":832.0999999046326}],"measures":[],"correlationId":"1f67a4213d7e89","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":73,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}