[MDEV-30453] Setting innodb_buffer_pool_filename to an empty string attempts to delete the data directory on shutdown Created: 2023-01-24 Updated: 2023-06-12 Resolved: 2023-03-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0 |
| Fix Version/s: | 11.1.1, 10.11.3, 11.0.2, 10.4.29, 10.5.20, 10.6.13, 10.8.8, 10.9.6, 10.10.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Roel Van de Paar | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-5.7, upstream-8.0 | ||
| Description |
|
Interestingly, the issue is present in MySQL 5.7 and 8.0 as well, but only in those releases.
Leads to:
Bug confirmed present in: Bug (or feature/syntax) confirmed not present in: Interface change: innodb_buffer_pool_filename is now a read-only variable |
| Comments |
| Comment by Marko Mäkelä [ 2023-01-24 ] | ||
|
Theoretically, we could duplicate some logic that is already part of unlink(), maybe poorly. Think of the following, for example:
Is there anything that really needs to be fixed? Directories cannot be deleted by unlink(), as the error message indicates. If you think that some other error message should be issued, what should it be? What if the file initially existed as a regular file, but someone deleted the file and created a directory by the same name, and then caused InnoDB to attempt to access the file? | ||
| Comment by Marko Mäkelä [ 2023-03-29 ] | ||
|
I addressed this by making the variable innodb_buffer_pool_filename read-only. An adventurous user might still specify innodb_buffer_pool_filename=ibdata1 or something in the server configuration, but short of removing the parameter (which could break compatibility) I do not think we can do much against that. |