Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
N/A
--source include/have_innodb.inc
CREATE TABLE t (id INT NOT NULL , UNIQUE (id DESC )) ENGINE=InnoDB;
ALTER TABLE t ADD PRIMARY KEY (id), ALGORITHM=INPLACE; # Also NOCOPY, DEFAULT /none
SHOW CREATE TABLE t;
# Cleanup
DROP TABLE t;
preview-10.8-MDEV-13756-desc-indexes 43444ff5d
2022-01-06 16:50:24 4 [ERROR] Found index PRIMARY whose column info does not match that of MariaDB.
2022-01-06 16:50:24 4 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/t
ALTER is important, direct CREATE with the resulting table definition doesn't cause the error.
ALGORITHM has been added for clarity, absence of any algorithm clause leads to the same result.
Also reproducible with reverse ASC/DESC attributes (ASC unique key and DESC PK).
Not reproducible when both are ASC or both are DESC.
Not reproducible with ALGORITHM=COPY.
Elena Stepanova
made changes -
2022-01-06 19:33
Description
{code:sql}
--source include/have_innodb.inc
CREATE TABLE t (id INT AUTO_INCREMENT, UNIQUE(id DESC)) ENGINE=InnoDB;
ALTER TABLE t ADD PRIMARY KEY (id), ALGORITHM=INPLACE; # Also NOCOPY, DEFAULT/none
SHOW CREATE TABLE t;
# Cleanup
DROP TABLE t;
{code}
{noformat:title=preview-10.8-MDEV-13756 -desc-indexes 43444ff5d}
2022-01-06 16:50:24 4 [ERROR] Found index PRIMARY whose column info does not match that of MariaDB.
2022-01-06 16:50:24 4 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/t
{noformat}
ALTER is important, direct CREATE with the resulting table definition doesn't cause the error.
ALGORITHM has been added for clarity, absence of any algorithm clause leads to the same result.
Also reproducible with reverse ASC/DESC attributes (ASC unique key and DESC PK).
Not reproducible when both are ASC or both are DESC.
Not reproducible with ALGORITHM=COPY.
Not reproducible without AUTO_INCREMENT.
{code:sql}
--source include/have_innodb.inc
CREATE TABLE t (id INT NOT NULL, UNIQUE(id DESC)) ENGINE=InnoDB;
ALTER TABLE t ADD PRIMARY KEY (id), ALGORITHM=INPLACE; # Also NOCOPY, DEFAULT/none
SHOW CREATE TABLE t;
# Cleanup
DROP TABLE t;
{code}
{noformat:title=preview-10.8-MDEV-13756 -desc-indexes 43444ff5d}
2022-01-06 16:50:24 4 [ERROR] Found index PRIMARY whose column info does not match that of MariaDB.
2022-01-06 16:50:24 4 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/t
{noformat}
ALTER is important, direct CREATE with the resulting table definition doesn't cause the error.
ALGORITHM has been added for clarity, absence of any algorithm clause leads to the same result.
Also reproducible with reverse ASC/DESC attributes (ASC unique key and DESC PK).
Not reproducible when both are ASC or both are DESC.
Not reproducible with ALGORITHM=COPY.
Marko Mäkelä
made changes -
2022-01-07 11:51
Assignee
Marko Mäkelä
[ marko
]
Thirunarayanan Balathandayuthapani
[ thiru
]
Fix Version/s
10.8.1
[ 26815
]
Fix Version/s
10.8
[ 26121
]
Resolution
Fixed
[ 1
]
Status
Open
[ 1
]
Closed
[ 6
]
{"report":{"fcp":920,"ttfb":198.40000009536743,"pageVisibility":"visible","entityId":106432,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"996356c2-8f1e-4bc8-a2f1-6e3b8741f3a5","navigationType":0,"readyForUser":1002.2000000476837,"redirectCount":0,"resourceLoadedEnd":1241.6000001430511,"resourceLoadedStart":204.10000014305115,"resourceTiming":[{"duration":232.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":204.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":204.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":437,"responseStart":0,"secureConnectionStart":0},{"duration":232.79999995231628,"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":204.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":204.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":437.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":242.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":204.60000014305115,"connectEnd":204.60000014305115,"connectStart":204.60000014305115,"domainLookupEnd":204.60000014305115,"domainLookupStart":204.60000014305115,"fetchStart":204.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":204.60000014305115,"responseEnd":446.90000009536743,"responseStart":446.90000009536743,"secureConnectionStart":204.60000014305115},{"duration":282.69999980926514,"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":204.80000019073486,"connectEnd":204.80000019073486,"connectStart":204.80000019073486,"domainLookupEnd":204.80000019073486,"domainLookupStart":204.80000019073486,"fetchStart":204.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":204.80000019073486,"responseEnd":487.5,"responseStart":487.5,"secureConnectionStart":204.80000019073486},{"duration":286.7000000476837,"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":205,"connectEnd":205,"connectStart":205,"domainLookupEnd":205,"domainLookupStart":205,"fetchStart":205,"redirectEnd":0,"redirectStart":0,"requestStart":205,"responseEnd":491.7000000476837,"responseStart":491.7000000476837,"secureConnectionStart":205},{"duration":287,"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":205.20000004768372,"connectEnd":205.20000004768372,"connectStart":205.20000004768372,"domainLookupEnd":205.20000004768372,"domainLookupStart":205.20000004768372,"fetchStart":205.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":205.20000004768372,"responseEnd":492.2000000476837,"responseStart":492.2000000476837,"secureConnectionStart":205.20000004768372},{"duration":287.2000000476837,"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":205.40000009536743,"connectEnd":205.40000009536743,"connectStart":205.40000009536743,"domainLookupEnd":205.40000009536743,"domainLookupStart":205.40000009536743,"fetchStart":205.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":205.40000009536743,"responseEnd":492.60000014305115,"responseStart":492.60000014305115,"secureConnectionStart":205.40000009536743},{"duration":384,"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":205.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":205.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":589.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":287.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":205.80000019073486,"connectEnd":205.80000019073486,"connectStart":205.80000019073486,"domainLookupEnd":205.80000019073486,"domainLookupStart":205.80000019073486,"fetchStart":205.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":205.80000019073486,"responseEnd":493.2000000476837,"responseStart":493.2000000476837,"secureConnectionStart":205.80000019073486},{"duration":383.7000000476837,"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":206,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":206,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":589.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":287.7000000476837,"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":206.10000014305115,"connectEnd":206.10000014305115,"connectStart":206.10000014305115,"domainLookupEnd":206.10000014305115,"domainLookupStart":206.10000014305115,"fetchStart":206.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":206.10000014305115,"responseEnd":493.80000019073486,"responseStart":493.80000019073486,"secureConnectionStart":206.10000014305115},{"duration":1001.8999998569489,"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":211.80000019073486,"connectEnd":211.80000019073486,"connectStart":211.80000019073486,"domainLookupEnd":211.80000019073486,"domainLookupStart":211.80000019073486,"fetchStart":211.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":211.80000019073486,"responseEnd":1213.7000000476837,"responseStart":1213.7000000476837,"secureConnectionStart":211.80000019073486},{"duration":1002.6999998092651,"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":212.30000019073486,"connectEnd":212.30000019073486,"connectStart":212.30000019073486,"domainLookupEnd":212.30000019073486,"domainLookupStart":212.30000019073486,"fetchStart":212.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":212.30000019073486,"responseEnd":1215,"responseStart":1215,"secureConnectionStart":212.30000019073486},{"duration":106.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":616.5,"connectEnd":616.5,"connectStart":616.5,"domainLookupEnd":616.5,"domainLookupStart":616.5,"fetchStart":616.5,"redirectEnd":0,"redirectStart":0,"requestStart":616.5,"responseEnd":722.7000000476837,"responseStart":722.7000000476837,"secureConnectionStart":616.5},{"duration":379.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":862.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":862.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1241.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":357,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":863.4000000953674,"connectEnd":863.4000000953674,"connectStart":863.4000000953674,"domainLookupEnd":863.4000000953674,"domainLookupStart":863.4000000953674,"fetchStart":863.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":863.4000000953674,"responseEnd":1220.4000000953674,"responseStart":1220.4000000953674,"secureConnectionStart":863.4000000953674},{"duration":363.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":863.8000001907349,"connectEnd":863.8000001907349,"connectStart":863.8000001907349,"domainLookupEnd":863.8000001907349,"domainLookupStart":863.8000001907349,"fetchStart":863.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":863.8000001907349,"responseEnd":1227,"responseStart":1227,"secureConnectionStart":863.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":17,"responseStart":198,"responseEnd":210,"domLoading":202,"domInteractive":1280,"domContentLoadedEventStart":1280,"domContentLoadedEventEnd":1325,"domComplete":2010,"loadEventStart":2010,"loadEventEnd":2011,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1250.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1251.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1251.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1253.6000001430511},{"name":"activityTabFullyLoaded","time":1341}],"measures":[],"correlationId":"f325f0527bc5e2","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":120,"dbReadsTimeInMs":16,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}