For InnoDB tables, the KEY_BLOCK_SIZE table option is only used for the Compressed row format. The Compressed row format is read-only in 10.6, so many users will probably want to convert to other row formats.
When the KEY_BLOCK_SIZE table option is set for an InnoDB table, it seems a bit difficult to get rid of.
Let's say that we start with this table:
CREATE TABLE innodb_test (id int PRIMARY KEY) KEY_BLOCK_SIZE=4;
|
You cannot set KEY_BLOCK_SIZE=DEFAULT at the same time you try to change the row format:
MariaDB [test]> ALTER TABLE innodb_test KEY_BLOCK_SIZE=DEFAULT, ROW_FORMAT=DYNAMIC;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DEFAULT, ROW_FORMAT=DYNAMIC' at line 1
|
You can almost set KEY_BLOCK_SIZE=0 at the same time you try to change the row format:
MariaDB [test]> ALTER TABLE innodb_test KEY_BLOCK_SIZE=0, ROW_FORMAT=DYNAMIC;
|
Query OK, 0 rows affected (0.027 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
But for some weird reason, that seems to move the original KEY_BLOCK_SIZE option to the PK:
MariaDB [test]> SHOW CREATE TABLE innodb_test\G
|
*************************** 1. row ***************************
|
Table: innodb_test
|
Create Table: CREATE TABLE `innodb_test` (
|
`id` int(11) NOT NULL,
|
PRIMARY KEY (`id`) KEY_BLOCK_SIZE=4
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC
|
1 row in set (0.000 sec)
|
Shouldn't there be a more reliable method to remove the KEY_BLOCK_SIZE option from an InnoDB table?
{"report":{"fcp":1058.8999998569489,"ttfb":147.59999990463257,"pageVisibility":"visible","entityId":102065,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"4571f72d-9d63-47c5-a4a3-a4d0863cb7bd","navigationType":0,"readyForUser":1125.0999999046326,"redirectCount":0,"resourceLoadedEnd":1279.3999998569489,"resourceLoadedStart":153.39999985694885,"resourceTiming":[{"duration":460,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":153.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":153.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":613.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":459.59999990463257,"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":153.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":153.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":613.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":469.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":153.89999985694885,"connectEnd":153.89999985694885,"connectStart":153.89999985694885,"domainLookupEnd":153.89999985694885,"domainLookupStart":153.89999985694885,"fetchStart":153.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":153.89999985694885,"responseEnd":623.7000000476837,"responseStart":623.7000000476837,"secureConnectionStart":153.89999985694885},{"duration":496.39999985694885,"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":154,"connectEnd":154,"connectStart":154,"domainLookupEnd":154,"domainLookupStart":154,"fetchStart":154,"redirectEnd":0,"redirectStart":0,"requestStart":154,"responseEnd":650.3999998569489,"responseStart":650.3999998569489,"secureConnectionStart":154},{"duration":500.2000000476837,"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":154.09999990463257,"connectEnd":154.09999990463257,"connectStart":154.09999990463257,"domainLookupEnd":154.09999990463257,"domainLookupStart":154.09999990463257,"fetchStart":154.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":154.09999990463257,"responseEnd":654.2999999523163,"responseStart":654.2999999523163,"secureConnectionStart":154.09999990463257},{"duration":500.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":154.20000004768372,"connectEnd":154.20000004768372,"connectStart":154.20000004768372,"domainLookupEnd":154.20000004768372,"domainLookupStart":154.20000004768372,"fetchStart":154.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":154.20000004768372,"responseEnd":654.7999999523163,"responseStart":654.7999999523163,"secureConnectionStart":154.20000004768372},{"duration":500.7999999523163,"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":154.29999995231628,"connectEnd":154.29999995231628,"connectStart":154.29999995231628,"domainLookupEnd":154.29999995231628,"domainLookupStart":154.29999995231628,"fetchStart":154.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":154.29999995231628,"responseEnd":655.0999999046326,"responseStart":655.0999999046326,"secureConnectionStart":154.29999995231628},{"duration":501.10000014305115,"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":154.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":154.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":655.5,"responseStart":0,"secureConnectionStart":0},{"duration":501,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":154.5,"connectEnd":154.5,"connectStart":154.5,"domainLookupEnd":154.5,"domainLookupStart":154.5,"fetchStart":154.5,"redirectEnd":0,"redirectStart":0,"requestStart":154.5,"responseEnd":655.5,"responseStart":655.5,"secureConnectionStart":154.5},{"duration":501.2999999523163,"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":154.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":154.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":656,"responseStart":0,"secureConnectionStart":0},{"duration":501.2000000476837,"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":154.89999985694885,"connectEnd":154.89999985694885,"connectStart":154.89999985694885,"domainLookupEnd":154.89999985694885,"domainLookupStart":154.89999985694885,"fetchStart":154.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":154.89999985694885,"responseEnd":656.0999999046326,"responseStart":656.0999999046326,"secureConnectionStart":154.89999985694885},{"duration":701.9000000953674,"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":155.89999985694885,"connectEnd":155.89999985694885,"connectStart":155.89999985694885,"domainLookupEnd":155.89999985694885,"domainLookupStart":155.89999985694885,"fetchStart":155.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":155.89999985694885,"responseEnd":857.7999999523163,"responseStart":857.7999999523163,"secureConnectionStart":155.89999985694885},{"duration":1123.5,"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":155.89999985694885,"connectEnd":155.89999985694885,"connectStart":155.89999985694885,"domainLookupEnd":155.89999985694885,"domainLookupStart":155.89999985694885,"fetchStart":155.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":155.89999985694885,"responseEnd":1279.3999998569489,"responseStart":1279.3999998569489,"secureConnectionStart":155.89999985694885},{"duration":419.2999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":859.2999999523163,"connectEnd":859.2999999523163,"connectStart":859.2999999523163,"domainLookupEnd":859.2999999523163,"domainLookupStart":859.2999999523163,"fetchStart":859.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":859.2999999523163,"responseEnd":1278.5999999046326,"responseStart":1278.5999999046326,"secureConnectionStart":859.2999999523163},{"duration":243.39999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1037.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1037.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1280.8999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":147,"responseEnd":149,"domLoading":150,"domInteractive":1303,"domContentLoadedEventStart":1303,"domContentLoadedEventEnd":1341,"domComplete":2119,"loadEventStart":2120,"loadEventEnd":2121,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1284.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1285.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1285.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1287.8999998569489},{"name":"activityTabFullyLoaded","time":1348.7999999523163}],"measures":[],"correlationId":"b25bec11c13a87","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":87,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}