KB article (https://mariadb.com/kb/en/innodb-online-ddl-operations-with-the-instant-alter-algorithm/#alter-table-modify-column) does not list any restrictions related to partitioned tables, while in reality ALGORITHM=INSTANT can not be applied to them.
Consider the following primitive example:
MariaDB [test]> create table tpa(id int, c1 varchar(10)) partition by range(id) (partition p1 values less than (10), partition p2 values less than (1000));
|
Query OK, 0 rows affected (0,310 sec)
|
|
MariaDB [test]> ALTER TABLE tpa MODIFY COLUMN c1 VARCHAR(30), LOCK=NONE, ALGORITHM=INSTANT;
|
ERROR 1846 (0A000): ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
|
MariaDB [test]> ALTER TABLE tpa remove partitioning;
|
Query OK, 0 rows affected (0,757 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> ALTER TABLE tpa MODIFY COLUMN c1 VARCHAR(30), LOCK=NONE, ALGORITHM=INSTANT;
|
Query OK, 0 rows affected (0,076 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select version();
|
+-----------------+
|
| version() |
|
+-----------------+
|
| 10.4.12-MariaDB |
|
+-----------------+
|
1 row in set (0,000 sec)
|
As soon as remove partitioning, ALTER works as expected.
So, please, either document this limitation or fix the bug in the code that does not allow to do INSTANT alters for partitioned tables even in a simplest case like presented above.
{"report":{"fcp":1004.2000000476837,"ttfb":320.2999999523163,"pageVisibility":"visible","entityId":83080,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"701b633d-2437-4a21-a331-596dc089ef7f","navigationType":0,"readyForUser":1081.4000000953674,"redirectCount":0,"resourceLoadedEnd":1299.7999999523163,"resourceLoadedStart":328.5,"resourceTiming":[{"duration":173.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":328.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":328.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":502.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":174.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":328.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":328.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":503.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":273.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":329,"connectEnd":329,"connectStart":329,"domainLookupEnd":329,"domainLookupStart":329,"fetchStart":329,"redirectEnd":0,"redirectStart":0,"requestStart":329,"responseEnd":602.7999999523163,"responseStart":602.7999999523163,"secureConnectionStart":329},{"duration":299.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":329.60000014305115,"connectEnd":329.60000014305115,"connectStart":329.60000014305115,"domainLookupEnd":329.60000014305115,"domainLookupStart":329.60000014305115,"fetchStart":329.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":329.60000014305115,"responseEnd":629,"responseStart":629,"secureConnectionStart":329.60000014305115},{"duration":303.10000014305115,"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":329.7999999523163,"connectEnd":329.7999999523163,"connectStart":329.7999999523163,"domainLookupEnd":329.7999999523163,"domainLookupStart":329.7999999523163,"fetchStart":329.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":329.7999999523163,"responseEnd":632.9000000953674,"responseStart":632.9000000953674,"secureConnectionStart":329.7999999523163},{"duration":303.2999999523163,"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":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":330,"responseEnd":633.2999999523163,"responseStart":633.2999999523163,"secureConnectionStart":330},{"duration":303.5,"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":330.10000014305115,"connectEnd":330.10000014305115,"connectStart":330.10000014305115,"domainLookupEnd":330.10000014305115,"domainLookupStart":330.10000014305115,"fetchStart":330.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":330.10000014305115,"responseEnd":633.6000001430511,"responseStart":633.6000001430511,"secureConnectionStart":330.10000014305115},{"duration":304.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":330.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":635.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":303.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":330.5,"connectEnd":330.5,"connectStart":330.5,"domainLookupEnd":330.5,"domainLookupStart":330.5,"fetchStart":330.5,"redirectEnd":0,"redirectStart":0,"requestStart":330.5,"responseEnd":634.1000001430511,"responseStart":634.1000001430511,"secureConnectionStart":330.5},{"duration":304.5,"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":330.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":635.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":303.90000009536743,"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":330.7000000476837,"connectEnd":330.7000000476837,"connectStart":330.7000000476837,"domainLookupEnd":330.7000000476837,"domainLookupStart":330.7000000476837,"fetchStart":330.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":330.7000000476837,"responseEnd":634.6000001430511,"responseStart":634.6000001430511,"secureConnectionStart":330.7000000476837},{"duration":959.7999999523163,"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":339.2000000476837,"connectEnd":339.2000000476837,"connectStart":339.2000000476837,"domainLookupEnd":339.2000000476837,"domainLookupStart":339.2000000476837,"fetchStart":339.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":339.2000000476837,"responseEnd":1299,"responseStart":1299,"secureConnectionStart":339.2000000476837},{"duration":959.1999998092651,"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":340.60000014305115,"connectEnd":340.60000014305115,"connectStart":340.60000014305115,"domainLookupEnd":340.60000014305115,"domainLookupStart":340.60000014305115,"fetchStart":340.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":340.60000014305115,"responseEnd":1299.7999999523163,"responseStart":1299.7999999523163,"secureConnectionStart":340.60000014305115},{"duration":470.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":821.7000000476837,"connectEnd":821.7000000476837,"connectStart":821.7000000476837,"domainLookupEnd":821.7000000476837,"domainLookupStart":821.7000000476837,"fetchStart":821.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":821.7000000476837,"responseEnd":1292.1000001430511,"responseStart":1292.1000001430511,"secureConnectionStart":821.7000000476837}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":156,"responseStart":321,"responseEnd":341,"domLoading":324,"domInteractive":1319,"domContentLoadedEventStart":1319,"domContentLoadedEventEnd":1356,"domComplete":2181,"loadEventStart":2181,"loadEventEnd":2182,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1302.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1303.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":1303.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1305.5},{"name":"activityTabFullyLoaded","time":1362.2000000476837}],"measures":[],"correlationId":"73fa8fb1b13e4","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":15,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}