Folks,
The files from a partitioned table were removed from disk but the rows for each of the files are on the INFORMATION_SCHEMA.INNODB_SYS_TABLES. The customer wants to know how to fix that and he has attached the files to the ticket that helped us to verify what is going on.
Please, let us know if you need any other information, cheers!
{"report":{"fcp":630.0999999046326,"ttfb":166.79999995231628,"pageVisibility":"visible","entityId":65690,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"3a71888f-58d4-4368-baff-47b846a94870","navigationType":0,"readyForUser":748.2000000476837,"redirectCount":0,"resourceLoadedEnd":659.5,"resourceLoadedStart":173,"resourceTiming":[{"duration":6.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":173,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":179.5,"responseStart":0,"secureConnectionStart":0},{"duration":6.599999904632568,"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":173.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":179.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":60.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":173.39999985694885,"connectEnd":173.39999985694885,"connectStart":173.39999985694885,"domainLookupEnd":173.39999985694885,"domainLookupStart":173.39999985694885,"fetchStart":173.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":173.39999985694885,"responseEnd":233.79999995231628,"responseStart":233.79999995231628,"secureConnectionStart":173.39999985694885},{"duration":150.79999995231628,"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":173.5,"connectEnd":173.5,"connectStart":173.5,"domainLookupEnd":173.5,"domainLookupStart":173.5,"fetchStart":173.5,"redirectEnd":0,"redirectStart":0,"requestStart":173.5,"responseEnd":324.2999999523163,"responseStart":324.2999999523163,"secureConnectionStart":173.5},{"duration":154.40000009536743,"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":173.59999990463257,"connectEnd":173.59999990463257,"connectStart":173.59999990463257,"domainLookupEnd":173.59999990463257,"domainLookupStart":173.59999990463257,"fetchStart":173.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":173.59999990463257,"responseEnd":328,"responseStart":328,"secureConnectionStart":173.59999990463257},{"duration":154.70000004768372,"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":173.79999995231628,"connectEnd":173.79999995231628,"connectStart":173.79999995231628,"domainLookupEnd":173.79999995231628,"domainLookupStart":173.79999995231628,"fetchStart":173.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":173.79999995231628,"responseEnd":328.5,"responseStart":328.5,"secureConnectionStart":173.79999995231628},{"duration":155.09999990463257,"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":173.79999995231628,"connectEnd":173.79999995231628,"connectStart":173.79999995231628,"domainLookupEnd":173.79999995231628,"domainLookupStart":173.79999995231628,"fetchStart":173.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":173.79999995231628,"responseEnd":328.89999985694885,"responseStart":328.89999985694885,"secureConnectionStart":173.79999995231628},{"duration":155.40000009536743,"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":173.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":329.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":155.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":174,"connectEnd":174,"connectStart":174,"domainLookupEnd":174,"domainLookupStart":174,"fetchStart":174,"redirectEnd":0,"redirectStart":0,"requestStart":174,"responseEnd":329.2999999523163,"responseStart":329.2999999523163,"secureConnectionStart":174},{"duration":155.5,"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":174.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":329.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":155.59999990463257,"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":174.29999995231628,"connectEnd":174.29999995231628,"connectStart":174.29999995231628,"domainLookupEnd":174.29999995231628,"domainLookupStart":174.29999995231628,"fetchStart":174.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":174.29999995231628,"responseEnd":329.89999985694885,"responseStart":329.89999985694885,"secureConnectionStart":174.29999995231628},{"duration":417,"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":175.09999990463257,"connectEnd":175.09999990463257,"connectStart":175.09999990463257,"domainLookupEnd":175.09999990463257,"domainLookupStart":175.09999990463257,"fetchStart":175.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":175.09999990463257,"responseEnd":592.0999999046326,"responseStart":592,"secureConnectionStart":175.09999990463257},{"duration":433.39999985694885,"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":175.20000004768372,"connectEnd":175.20000004768372,"connectStart":175.20000004768372,"domainLookupEnd":175.20000004768372,"domainLookupStart":175.20000004768372,"fetchStart":175.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":175.20000004768372,"responseEnd":608.5999999046326,"responseStart":608.5999999046326,"secureConnectionStart":175.20000004768372},{"duration":207.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":385.2999999523163,"connectEnd":385.2999999523163,"connectStart":385.2999999523163,"domainLookupEnd":385.2999999523163,"domainLookupStart":385.2999999523163,"fetchStart":385.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":385.2999999523163,"responseEnd":592.5,"responseStart":592.5,"secureConnectionStart":385.2999999523163},{"duration":2,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":623.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":623.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":625.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":3.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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","startTime":646.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":646.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":649.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":3.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":646.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":646.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":650.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":4.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":647.5,"connectEnd":647.5,"connectStart":647.5,"domainLookupEnd":647.5,"domainLookupStart":647.5,"fetchStart":647.5,"redirectEnd":0,"redirectStart":0,"requestStart":647.5,"responseEnd":652.2000000476837,"responseStart":652.2000000476837,"secureConnectionStart":647.5},{"duration":10.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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","startTime":647.7999999523163,"connectEnd":647.7999999523163,"connectStart":647.7999999523163,"domainLookupEnd":647.7999999523163,"domainLookupStart":647.7999999523163,"fetchStart":647.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":647.7999999523163,"responseEnd":658.2999999523163,"responseStart":658.2999999523163,"secureConnectionStart":647.7999999523163},{"duration":11.299999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/86ee9bbc76cd1bcd8556fcdcf46241c9-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":648.2000000476837,"connectEnd":648.2000000476837,"connectStart":648.2000000476837,"domainLookupEnd":648.2000000476837,"domainLookupStart":648.2000000476837,"fetchStart":648.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":648.2000000476837,"responseEnd":659.5,"responseStart":659.5,"secureConnectionStart":648.2000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":23,"responseStart":167,"responseEnd":169,"domLoading":170,"domInteractive":830,"domContentLoadedEventStart":830,"domContentLoadedEventEnd":893,"domComplete":1027,"loadEventStart":1027,"loadEventEnd":1029,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":782.5999999046326},{"name":"bigPipe.sidebar-id.end","time":783.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":783.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":787.7000000476837},{"name":"activityTabFullyLoaded","time":909.0999999046326}],"measures":[],"correlationId":"7b42813cf25403","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I can only think of re-creating the fake files and then dropping the table. Like so (file operations of course should be done in a normal way, here they are done from MySQL client for the sake of simplicity):
Initial table
Remove the table files from the disk
| @@datadir |
| /data/bld/10.0/data/ |
MariaDB [db1]> system rm /data/bld/10.0/data/db1/t1*
MariaDB [db1]> show tables;
| 14 | SYS_DATAFILES | 0 | 5 | 0 | Antelope | Redundant | 0 |
| 11 | SYS_FOREIGN | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 12 | SYS_FOREIGN_COLS | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 13 | SYS_TABLESPACES | 0 | 6 | 0 | Antelope | Redundant | 0 |
| 18 | db1/t1#P#p0 | 1 | 4 | 4 | Antelope | Compact | 0 |
| 19 | db1/t1#P#p1 | 1 | 4 | 5 | Antelope | Compact | 0 |
| 17 | mysql/gtid_slave_pos | 1 | 7 | 3 | Antelope | Compact | 0 |
| 16 | mysql/innodb_index_stats | 1 | 11 | 2 | Antelope | Compact | 0 |
| 15 | mysql/innodb_table_stats | 1 | 9 | 1 | Antelope | Compact | 0 |
Create a fake table with the same partitions in a different schema (won't be able to do in the current schema)
Copy table files and then drop the fake table
MariaDB [db2]> system cp /data/bld/10.0/data/db2/t1* /data/bld/10.0/data/db1/
Problematic files are still there
| 14 | SYS_DATAFILES | 0 | 5 | 0 | Antelope | Redundant | 0 |
| 11 | SYS_FOREIGN | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 12 | SYS_FOREIGN_COLS | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 13 | SYS_TABLESPACES | 0 | 6 | 0 | Antelope | Redundant | 0 |
| 18 | db1/t1#P#p0 | 1 | 4 | 4 | Antelope | Compact | 0 |
| 19 | db1/t1#P#p1 | 1 | 4 | 5 | Antelope | Compact | 0 |
| 17 | mysql/gtid_slave_pos | 1 | 7 | 3 | Antelope | Compact | 0 |
| 16 | mysql/innodb_index_stats | 1 | 11 | 2 | Antelope | Compact | 0 |
| 15 | mysql/innodb_table_stats | 1 | 9 | 1 | Antelope | Compact | 0 |
Now drop the bad table
| 14 | SYS_DATAFILES | 0 | 5 | 0 | Antelope | Redundant | 0 |
| 11 | SYS_FOREIGN | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 12 | SYS_FOREIGN_COLS | 0 | 7 | 0 | Antelope | Redundant | 0 |
| 13 | SYS_TABLESPACES | 0 | 6 | 0 | Antelope | Redundant | 0 |
| 17 | mysql/gtid_slave_pos | 1 | 7 | 3 | Antelope | Compact | 0 |
| 16 | mysql/innodb_index_stats | 1 | 11 | 2 | Antelope | Compact | 0 |
| 15 | mysql/innodb_table_stats | 1 | 9 | 1 | Antelope | Compact | 0 |
Of course, it's a hack and comes without any warranty. The right answer is "restore from the backup and never do it again".
marko, do you have a better idea?