Background encryption of the InnoDB system tablespace appears to be broken. To reproduce, run the following:
CREATE DATABASE IF NOT EXISTS db1;
|
USE db1;
|
DROP TABLE IF EXISTS default_encrypted_tab1;
|
DROP TABLE IF EXISTS default_encrypted_tab2;
|
SET GLOBAL innodb_encrypt_tables=OFF;
|
SET GLOBAL innodb_file_per_table=OFF;
|
CREATE TABLE default_encrypted_tab1 ( id int PRIMARY KEY, str varchar(50) );
|
SET GLOBAL innodb_file_per_table=ON;
|
CREATE TABLE default_encrypted_tab2 ( id int PRIMARY KEY, str varchar(50) );
|
SELECT SLEEP(5);
|
SELECT SPACE, NAME, ENCRYPTION_SCHEME, ROTATING_OR_FLUSHING FROM information_schema.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'db1/default_encrypted_tab%'\G
|
SET GLOBAL innodb_encrypt_tables='FORCE';
|
SET GLOBAL innodb_encryption_threads=1;
|
SET GLOBAL innodb_encryption_rotate_key_age=1;
|
SELECT SLEEP(5);
|
SELECT SPACE, NAME, ENCRYPTION_SCHEME, ROTATING_OR_FLUSHING FROM information_schema.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'db1/default_encrypted_tab%'\G
|
The output shows that only the file-per-table tablespace gets encrypted:
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS db1;
|
Query OK, 0 rows affected, 1 warning (0.000 sec)
|
|
MariaDB [(none)]> USE db1;
|
Reading table information for completion of table and column names
|
You can turn off this feature to get a quicker startup with -A
|
|
Database changed
|
MariaDB [db1]> DROP TABLE IF EXISTS default_encrypted_tab1;
|
Query OK, 0 rows affected (0.010 sec)
|
|
MariaDB [db1]> DROP TABLE IF EXISTS default_encrypted_tab2;
|
Query OK, 0 rows affected (0.005 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_encrypt_tables=OFF;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_file_per_table=OFF;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [db1]> CREATE TABLE default_encrypted_tab1 ( id int PRIMARY KEY, str varchar(50) );
|
Query OK, 0 rows affected (0.006 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_file_per_table=ON;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [db1]> CREATE TABLE default_encrypted_tab2 ( id int PRIMARY KEY, str varchar(50) );
|
Query OK, 0 rows affected (0.007 sec)
|
|
MariaDB [db1]> SELECT SLEEP(5);
|
+----------+
|
| SLEEP(5) |
|
+----------+
|
| 0 |
|
+----------+
|
1 row in set (5.000 sec)
|
|
MariaDB [db1]> SELECT SPACE, NAME, ENCRYPTION_SCHEME, ROTATING_OR_FLUSHING FROM information_schema.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'db1/default_encrypted_tab%'\G
|
Empty set (0.000 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_encrypt_tables='FORCE';
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_encryption_threads=1;
|
Query OK, 0 rows affected (0.001 sec)
|
|
MariaDB [db1]> SET GLOBAL innodb_encryption_rotate_key_age=1;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [db1]> SELECT SLEEP(5);
|
+----------+
|
| SLEEP(5) |
|
+----------+
|
| 0 |
|
+----------+
|
1 row in set (5.000 sec)
|
|
MariaDB [db1]> SELECT SPACE, NAME, ENCRYPTION_SCHEME, ROTATING_OR_FLUSHING FROM information_schema.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'db1/default_encrypted_tab%'\G
|
*************************** 1. row ***************************
|
SPACE: 415
|
NAME: db1/default_encrypted_tab2
|
ENCRYPTION_SCHEME: 1
|
ROTATING_OR_FLUSHING: 0
|
1 row in set (0.000 sec)
|
Was this broken by the fix for MDEV-14398?
- relates to
-
MDEV-14398
When innodb_encryption_rotate_key_age=0 is set, server won't encrypt tablespaces
-
-
Closed
{"report":{"fcp":1161.1000003814697,"ttfb":325.69999980926514,"pageVisibility":"visible","entityId":77151,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"5456bb59-8831-4caa-9b6a-e77055278b36","navigationType":0,"readyForUser":1266.4000005722046,"redirectCount":0,"resourceLoadedEnd":825,"resourceLoadedStart":336.30000019073486,"resourceTiming":[{"duration":76.10000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":336.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":336.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":412.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":76.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":336.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":336.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":412.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":313.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":336.69999980926514,"connectEnd":336.69999980926514,"connectStart":336.69999980926514,"domainLookupEnd":336.69999980926514,"domainLookupStart":336.69999980926514,"fetchStart":336.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":415.19999980926514,"responseEnd":650.6000003814697,"responseStart":488.69999980926514,"secureConnectionStart":336.69999980926514},{"duration":488.0999994277954,"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":336.9000005722046,"connectEnd":336.9000005722046,"connectStart":336.9000005722046,"domainLookupEnd":336.9000005722046,"domainLookupStart":336.9000005722046,"fetchStart":336.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":415.19999980926514,"responseEnd":825,"responseStart":506.30000019073486,"secureConnectionStart":336.9000005722046},{"duration":130.39999961853027,"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":337.1000003814697,"connectEnd":337.1000003814697,"connectStart":337.1000003814697,"domainLookupEnd":337.1000003814697,"domainLookupStart":337.1000003814697,"fetchStart":337.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":415.69999980926514,"responseEnd":467.5,"responseStart":466,"secureConnectionStart":337.1000003814697},{"duration":129.9000005722046,"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":337.19999980926514,"connectEnd":337.19999980926514,"connectStart":337.19999980926514,"domainLookupEnd":337.19999980926514,"domainLookupStart":337.19999980926514,"fetchStart":337.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":417.4000005722046,"responseEnd":467.1000003814697,"responseStart":465.4000005722046,"secureConnectionStart":337.19999980926514},{"duration":144.89999961853027,"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":337.4000005722046,"connectEnd":337.4000005722046,"connectStart":337.4000005722046,"domainLookupEnd":337.4000005722046,"domainLookupStart":337.4000005722046,"fetchStart":337.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":417.1000003814697,"responseEnd":482.30000019073486,"responseStart":481.1000003814697,"secureConnectionStart":337.4000005722046},{"duration":78.09999942779541,"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":337.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":337.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":415.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":118.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":337.80000019073486,"connectEnd":337.80000019073486,"connectStart":337.80000019073486,"domainLookupEnd":337.80000019073486,"domainLookupStart":337.80000019073486,"fetchStart":337.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":419.1000003814697,"responseEnd":456.6000003814697,"responseStart":455.4000005722046,"secureConnectionStart":337.80000019073486},{"duration":81.09999942779541,"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":337.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":337.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":419,"responseStart":0,"secureConnectionStart":0},{"duration":120,"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":338,"connectEnd":338,"connectStart":338,"domainLookupEnd":338,"domainLookupStart":338,"fetchStart":338,"redirectEnd":0,"redirectStart":0,"requestStart":420.19999980926514,"responseEnd":458,"responseStart":456.69999980926514,"secureConnectionStart":338},{"duration":480.80000019073486,"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":340.19999980926514,"connectEnd":340.19999980926514,"connectStart":340.19999980926514,"domainLookupEnd":340.19999980926514,"domainLookupStart":340.19999980926514,"fetchStart":340.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":451.6000003814697,"responseEnd":821,"responseStart":814.6000003814697,"secureConnectionStart":340.19999980926514},{"duration":481.80000019073486,"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.30000019073486,"connectEnd":340.30000019073486,"connectStart":340.30000019073486,"domainLookupEnd":340.30000019073486,"domainLookupStart":340.30000019073486,"fetchStart":340.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":499.19999980926514,"responseEnd":822.1000003814697,"responseStart":817.4000005722046,"secureConnectionStart":340.30000019073486},{"duration":130.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":807.6000003814697,"connectEnd":807.6000003814697,"connectStart":807.6000003814697,"domainLookupEnd":807.6000003814697,"domainLookupStart":807.6000003814697,"fetchStart":807.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":907.5,"responseEnd":937.8000001907349,"responseStart":937.1999998092651,"secureConnectionStart":807.6000003814697}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":116,"responseStart":326,"responseEnd":333,"domLoading":334,"domInteractive":1416,"domContentLoadedEventStart":1416,"domContentLoadedEventEnd":1480,"domComplete":2594,"loadEventStart":2594,"loadEventEnd":2595,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1364.5},{"name":"bigPipe.sidebar-id.end","time":1365.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1365.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.end","time":1368},{"name":"activityTabFullyLoaded","time":1488.6999998092651}],"measures":[],"correlationId":"52f57e238bf9d6","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":122,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}