This upstream bug is verified, but not yet fixed:
https://bugs.mysql.com/bug.php?id=71725
Some users are reporting similar behavior in MariaDB 10.1.24, so this may be the cause. See here for an example:
MariaDB [(none)]> use appdb;
|
Database changed
|
MariaDB [appdb]> SELECT t.TABLE_SCHEMA, t.TABLE_NAME, ist.SPACE,
|
-> CASE ist.SPACE
|
-> WHEN 0 THEN 'innodb_file_per_table=OFF'
|
-> ELSE 'innodb_file_per_table=ON'
|
-> END AS innodb_file_per_table_value
|
-> FROM information_schema.INNODB_SYS_TABLES ist
|
-> JOIN information_schema.TABLES t
|
-> ON ist.NAME = CONCAT(t.TABLE_SCHEMA, '/', t.TABLE_NAME)
|
-> AND t.ENGINE = 'InnoDB'
|
-> WHERE t.TABLE_SCHEMA='appdb'
|
-> AND t.TABLE_NAME in ('tab2','tab1');
|
+--------------+--------------+--------+-----------------------------+
|
| TABLE_SCHEMA | TABLE_NAME | SPACE | innodb_file_per_table_value |
|
+--------------+--------------+--------+-----------------------------+
|
| appdb | tab1 | 80590 | innodb_file_per_table=ON |
|
| appdb | tab2 | 80586 | innodb_file_per_table=ON |
|
+--------------+--------------+--------+-----------------------------+
|
2 rows in set (0.03 sec)
|
|
MariaDB [appdb]> SELECT * FROM information_schema.INNODB_SYS_TABLES WHERE NAME = 'appdb/tab2'\G
|
*************************** 1. row ***************************
|
TABLE_ID: 80598
|
NAME: appdb/tab2
|
FLAG: 1
|
N_COLS: 17
|
SPACE: 80586
|
FILE_FORMAT: Antelope
|
ROW_FORMAT: Compact
|
ZIP_PAGE_SIZE: 0
|
1 row in set (0.02 sec)
|
|
MariaDB [appdb]> SELECT * FROM information_schema.INNODB_SYS_TABLESPACES WHERE NAME = 'appdb/tab2'\G
|
Empty set (0.01 sec)
|
|
MariaDB [appdb]> SELECT * FROM information_schema.INNODB_SYS_TABLES WHERE NAME = 'appdb/tab1'\G
|
*************************** 1. row ***************************
|
TABLE_ID: 80602
|
NAME: appdb/tab1
|
FLAG: 1
|
N_COLS: 17
|
SPACE: 80590
|
FILE_FORMAT: Antelope
|
ROW_FORMAT: Compact
|
ZIP_PAGE_SIZE: 0
|
1 row in set (0.01 sec)
|
|
MariaDB [appdb]> SELECT * FROM information_schema.INNODB_SYS_TABLESPACES WHERE NAME = 'appdb/tab1'\G
|
Empty set (0.01 sec)
|
|
MariaDB [appdb]> SELECT * FROM information_schema.INNODB_SYS_TABLESPACES WHERE SPACE IN(80586, 80590)\G
|
Empty set (0.01 sec)
|
{"report":{"fcp":873,"ttfb":274.5,"pageVisibility":"visible","entityId":83471,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"163e1aa3-1ea5-4320-8028-cacef9403844","navigationType":0,"readyForUser":969.9000000953674,"redirectCount":0,"resourceLoadedEnd":1000.9000000953674,"resourceLoadedStart":279.30000019073486,"resourceTiming":[{"duration":39.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":279.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":318.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":39.90000009536743,"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":279.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":319.5,"responseStart":0,"secureConnectionStart":0},{"duration":93.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":279.7000002861023,"connectEnd":279.7000002861023,"connectStart":279.7000002861023,"domainLookupEnd":279.7000002861023,"domainLookupStart":279.7000002861023,"fetchStart":279.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":279.7000002861023,"responseEnd":373,"responseStart":373,"secureConnectionStart":279.7000002861023},{"duration":200.5,"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":279.90000009536743,"connectEnd":279.90000009536743,"connectStart":279.90000009536743,"domainLookupEnd":279.90000009536743,"domainLookupStart":279.90000009536743,"fetchStart":279.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":279.90000009536743,"responseEnd":480.40000009536743,"responseStart":480.40000009536743,"secureConnectionStart":279.90000009536743},{"duration":203.90000009536743,"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":280.09999990463257,"connectEnd":280.09999990463257,"connectStart":280.09999990463257,"domainLookupEnd":280.09999990463257,"domainLookupStart":280.09999990463257,"fetchStart":280.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":280.09999990463257,"responseEnd":484,"responseStart":484,"secureConnectionStart":280.09999990463257},{"duration":204.59999990463257,"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":280.30000019073486,"connectEnd":280.30000019073486,"connectStart":280.30000019073486,"domainLookupEnd":280.30000019073486,"domainLookupStart":280.30000019073486,"fetchStart":280.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":280.30000019073486,"responseEnd":484.90000009536743,"responseStart":484.90000009536743,"secureConnectionStart":280.30000019073486},{"duration":204.90000009536743,"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":280.40000009536743,"connectEnd":280.40000009536743,"connectStart":280.40000009536743,"domainLookupEnd":280.40000009536743,"domainLookupStart":280.40000009536743,"fetchStart":280.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":280.40000009536743,"responseEnd":485.30000019073486,"responseStart":485.30000019073486,"secureConnectionStart":280.40000009536743},{"duration":232.80000019073486,"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":280.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":513.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":204.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":280.80000019073486,"connectEnd":280.80000019073486,"connectStart":280.80000019073486,"domainLookupEnd":280.80000019073486,"domainLookupStart":280.80000019073486,"fetchStart":280.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":280.80000019073486,"responseEnd":485.7000002861023,"responseStart":485.7000002861023,"secureConnectionStart":280.80000019073486},{"duration":232.80000019073486,"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":280.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":513.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":205.10000038146973,"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":281.09999990463257,"connectEnd":281.09999990463257,"connectStart":281.09999990463257,"domainLookupEnd":281.09999990463257,"domainLookupStart":281.09999990463257,"fetchStart":281.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":281.09999990463257,"responseEnd":486.2000002861023,"responseStart":486.2000002861023,"secureConnectionStart":281.09999990463257},{"duration":477.90000009536743,"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":287.5,"connectEnd":287.5,"connectStart":287.5,"domainLookupEnd":287.5,"domainLookupStart":287.5,"fetchStart":287.5,"redirectEnd":0,"redirectStart":0,"requestStart":287.5,"responseEnd":765.4000000953674,"responseStart":765.4000000953674,"secureConnectionStart":287.5},{"duration":502.8999996185303,"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":294.7000002861023,"connectEnd":294.7000002861023,"connectStart":294.7000002861023,"domainLookupEnd":294.7000002861023,"domainLookupStart":294.7000002861023,"fetchStart":294.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":294.7000002861023,"responseEnd":797.5999999046326,"responseStart":797.5999999046326,"secureConnectionStart":294.7000002861023},{"duration":241.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":524.2000002861023,"connectEnd":524.2000002861023,"connectStart":524.2000002861023,"domainLookupEnd":524.2000002861023,"domainLookupStart":524.2000002861023,"fetchStart":524.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":524.2000002861023,"responseEnd":765.7000002861023,"responseStart":765.7000002861023,"secureConnectionStart":524.2000002861023},{"duration":50.59999990463257,"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":779.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":779.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":830.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":212.59999990463257,"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":780.4000000953674,"connectEnd":780.4000000953674,"connectStart":780.4000000953674,"domainLookupEnd":780.4000000953674,"domainLookupStart":780.4000000953674,"fetchStart":780.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":780.4000000953674,"responseEnd":993,"responseStart":993,"secureConnectionStart":780.4000000953674},{"duration":220.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":780.7000002861023,"connectEnd":780.7000002861023,"connectStart":780.7000002861023,"domainLookupEnd":780.7000002861023,"domainLookupStart":780.7000002861023,"fetchStart":780.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":780.7000002861023,"responseEnd":1000.9000000953674,"responseStart":1000.9000000953674,"secureConnectionStart":780.7000002861023},{"duration":242.59999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":866.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":866.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1109.5,"responseStart":0,"secureConnectionStart":0},{"duration":178.2000002861023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":888.5,"connectEnd":888.5,"connectStart":888.5,"domainLookupEnd":888.5,"domainLookupStart":888.5,"fetchStart":888.5,"redirectEnd":0,"redirectStart":0,"requestStart":888.5,"responseEnd":1066.7000002861023,"responseStart":1066.7000002861023,"secureConnectionStart":888.5}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":96,"responseStart":275,"responseEnd":295,"domLoading":278,"domInteractive":1058,"domContentLoadedEventStart":1058,"domContentLoadedEventEnd":1106,"domComplete":1344,"loadEventStart":1344,"loadEventEnd":1345,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1016.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1017.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1017.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":1019.8000001907349},{"name":"activityTabFullyLoaded","time":1128.3000001907349}],"measures":[],"correlationId":"75e61e31d1fa73","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I was aware of this problem already in 2015 or maybe even earlier, while still working at Oracle. The tables were introduced without my approval.
In my opinion, it was a mistake to add the SYS_TABLESPACES and SYS_DATAFILES in the first place in MySQL 5.6. The table SYS_TABLESPACES is completely redundant; files are identified by SYS_TABLES anyway. Likewise, the only additional value that the table SYS_DATAFILES might bring is to register the location of data files when the DATA DIRECTORY attribute is being used. But, we store that information also in .isl files!
In a support issue a couple of months ago, I noticed that orphan entries can accumulate in both these tables under some circumstances.
In summary, adding file paths to the system tablespace is only adding problems, not solving any.
Unfortunately, we missed the opportunity to remove these tables in 10.5, due to higher-priority tasks. I think that we should do it in 10.6, and we should try to make the entries in the tables optional in older versions.
Note: In MySQL 5.7, SYS_TABLESPACES became necessary for the multi-table tablespaces that can be created by CREATE TABLESPACE. MariaDB does not support CREATE TABLESPACE for InnoDB, in my opinion for good reasons.