[MDEV-15185] PARTITION files removed, but not from INFORMATION_SCHEMA.INNODB_SYS_TABLES Created: 2018-02-02 Updated: 2020-08-25 Resolved: 2018-03-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.0.33 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Wagner Bianchi (Inactive) | Assignee: | Wagner Bianchi (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
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! |
| Comments |
| Comment by Elena Stepanova [ 2018-02-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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):
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? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-02-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
elenst, that sounds about right. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steven McDowall [ 2018-02-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@elena – As the customer in question that technique has been tried and all variations. Alas, the description is far from complete and it's far more complex. To be brief, the original database system was Windows and then moved to Linux. This in itself caused interesting issues with file names and case sensitivity. There is no way we can find that, now that we are on Linux, a way to create the partition name (to drop) that has the lower case #p# that is found in the INFO_SYS tables .. Anything we do creates a new #P# thing . We worked literally 5 hours with a MariaDB tech to try various things to remove these and nothing worked, hence the ticket. back in the day when the MDEV bug was around that partition names ignore the lower-case- file setting thing (don't remember which MDEV but it's there) .. which also lead to this issue .. It still seems quite "absurd" that since these ghost partitions are not even needed (they were created over 2 years ago and deleted)..that there is not a simple way to just remove them from the offending "INFO SCHEMA" .. The only issue they are causing are 480+ warning lines upon MariaDB startup complaining they aren't there .. Pretty annoying .. Are you sure there aren't any little dev tools to hack the INFO SCHEMA information to remove these things? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-02-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
"INFO SCHEMA" does not hold any information of its own, it only provides read access to metadata in the database. The problem is not in the information schema, it's in the discrepancy between the contents of the system tablespace and the rest of the data; and to get rid of it, you need to hack not the seemingly unimportant information schema, but the highly sensitive InnoDB system tablespace. I'm not aware of any reasonably safe ways to do so; I suppose if there were any, marko would have suggested them in his previous comment. We can ask him again. Probably the above-mentioned | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-03-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-11633 will provide a way to "hack the INFO SCHEMA", or, more correctly, to get rid of these stale entries in the InnoDB data dictionary.
So, I'm closing this issue. I'll be continued in one of the issues above. |