As noted by midenok, there was a typo in the code introduced by MDEV-15562:
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
|
index 9e951f8f78b..5fe71a5eb4d 100644
|
--- a/storage/innobase/btr/btr0cur.cc
|
+++ b/storage/innobase/btr/btr0cur.cc
|
@@ -486,7 +486,7 @@ static dberr_t btr_cur_instant_init_low(dict_index_t* index, mtr_t* mtr)
|
always written with zero length. The DB_TRX_ID will
|
start right after any fixed-length columns. */
|
for (uint i = index->n_uniq; i--; ) {
|
- trx_id_offset += index->fields[0].fixed_len;
|
+ trx_id_offset += index->fields[i].fixed_len;
|
}
|
}
|
|
Before the above fix, the following test case change would fail to find the table t4 after the first server restart:
diff --git a/mysql-test/suite/innodb/t/instant_drop.test b/mysql-test/suite/innodb/t/instant_drop.test
|
index cb1aabce94b..566ac02b314 100644
|
--- a/mysql-test/suite/innodb/t/instant_drop.test
|
+++ b/mysql-test/suite/innodb/t/instant_drop.test
|
@@ -80,6 +80,10 @@ create table t3(f1 int, f2 int not null)engine=innodb;
|
insert into t3 values(1, 2);
|
alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant;
|
|
+create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
|
+insert into t4 values('4',5,6);
|
+alter table t4 drop column c;
|
+
|
--source include/restart_mysqld.inc
|
select * from t1;
|
alter table t1 add column f6 int default 9,drop column f5, algorithm = instant;
|
@@ -94,6 +98,11 @@ show create table t2;
|
|
select * from t3;
|
alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant;
|
+
|
+select * from t4;
|
+alter table t4 add column d varchar(5) default 'fubar';
|
+insert into t4 values('',0,'snafu');
|
--source include/restart_mysqld.inc
|
select * from t3;
|
-drop table t1,t2,t3;
|
+select * from t4;
|
+drop table t1,t2,t3,t4;
|
{"report":{"fcp":887.4000000953674,"ttfb":162,"pageVisibility":"visible","entityId":71786,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c99f4084-8363-4292-b104-81a02fdbb5d0","navigationType":0,"readyForUser":949.6000001430511,"redirectCount":0,"resourceLoadedEnd":1192.1000001430511,"resourceLoadedStart":169.70000004768372,"resourceTiming":[{"duration":239.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":169.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":169.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":408.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":239,"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":170,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":409,"responseStart":0,"secureConnectionStart":0},{"duration":249.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":170,"connectEnd":170,"connectStart":170,"domainLookupEnd":170,"domainLookupStart":170,"fetchStart":170,"redirectEnd":0,"redirectStart":0,"requestStart":170,"responseEnd":419.10000014305115,"responseStart":419.10000014305115,"secureConnectionStart":170},{"duration":293.7000000476837,"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":170.20000004768372,"connectEnd":170.20000004768372,"connectStart":170.20000004768372,"domainLookupEnd":170.20000004768372,"domainLookupStart":170.20000004768372,"fetchStart":170.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":170.20000004768372,"responseEnd":463.90000009536743,"responseStart":463.90000009536743,"secureConnectionStart":170.20000004768372},{"duration":289.90000009536743,"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":170.20000004768372,"connectEnd":170.20000004768372,"connectStart":170.20000004768372,"domainLookupEnd":170.20000004768372,"domainLookupStart":170.20000004768372,"fetchStart":170.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":170.20000004768372,"responseEnd":460.10000014305115,"responseStart":460.10000014305115,"secureConnectionStart":170.20000004768372},{"duration":294,"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":170.40000009536743,"connectEnd":170.40000009536743,"connectStart":170.40000009536743,"domainLookupEnd":170.40000009536743,"domainLookupStart":170.40000009536743,"fetchStart":170.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":170.40000009536743,"responseEnd":464.40000009536743,"responseStart":464.40000009536743,"secureConnectionStart":170.40000009536743},{"duration":294.5,"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":170.40000009536743,"connectEnd":170.40000009536743,"connectStart":170.40000009536743,"domainLookupEnd":170.40000009536743,"domainLookupStart":170.40000009536743,"fetchStart":170.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":170.40000009536743,"responseEnd":464.90000009536743,"responseStart":464.90000009536743,"secureConnectionStart":170.40000009536743},{"duration":296.59999990463257,"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":170.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":467.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":298.60000014305115,"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":170.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":469.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":296.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":170.70000004768372,"connectEnd":170.70000004768372,"connectStart":170.70000004768372,"domainLookupEnd":170.70000004768372,"domainLookupStart":170.70000004768372,"fetchStart":170.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":170.70000004768372,"responseEnd":467.10000014305115,"responseStart":467.10000014305115,"secureConnectionStart":170.70000004768372},{"duration":298.40000009536743,"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":171,"connectEnd":171,"connectStart":171,"domainLookupEnd":171,"domainLookupStart":171,"fetchStart":171,"redirectEnd":0,"redirectStart":0,"requestStart":171,"responseEnd":469.40000009536743,"responseStart":469.40000009536743,"secureConnectionStart":171},{"duration":429.5,"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":171.70000004768372,"connectEnd":171.70000004768372,"connectStart":171.70000004768372,"domainLookupEnd":171.70000004768372,"domainLookupStart":171.70000004768372,"fetchStart":171.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":171.70000004768372,"responseEnd":601.2000000476837,"responseStart":601.2000000476837,"secureConnectionStart":171.70000004768372},{"duration":1020.4000000953674,"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":171.70000004768372,"connectEnd":171.70000004768372,"connectStart":171.70000004768372,"domainLookupEnd":171.70000004768372,"domainLookupStart":171.70000004768372,"fetchStart":171.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":171.70000004768372,"responseEnd":1192.1000001430511,"responseStart":1192.1000001430511,"secureConnectionStart":171.70000004768372},{"duration":554.5999999046326,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":636.6000001430511,"connectEnd":636.6000001430511,"connectStart":636.6000001430511,"domainLookupEnd":636.6000001430511,"domainLookupStart":636.6000001430511,"fetchStart":636.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":636.6000001430511,"responseEnd":1191.2000000476837,"responseStart":1191.2000000476837,"secureConnectionStart":636.6000001430511}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":22,"responseStart":162,"responseEnd":164,"domLoading":165,"domInteractive":1215,"domContentLoadedEventStart":1215,"domContentLoadedEventEnd":1251,"domComplete":2283,"loadEventStart":2283,"loadEventEnd":2284,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1199.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1200.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1200.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1203.1000001430511},{"name":"activityTabFullyLoaded","time":1258}],"measures":[],"correlationId":"22ed1731115468","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":81,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}