[MDEV-23570] deprecate keep_files_on_create Created: 2020-08-25 Updated: 2022-02-01 Resolved: 2022-01-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table |
| Fix Version/s: | 10.8.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
MyISAM/Aria traditionally overwrite files on CREATE TABLE. That is, if tablename.MYI file or tablename.MYD or .MAI or .MAD exists, it'll be silently overwritten. Presumably, it was done because there was no way to get rid of orphan MyISAM/Aria files otherwise. This can be dangerous and cause the data loss. As a fix a new sysvar keep_files_on_create was introduced in 2007. If set, MyISAM/Aria will error out if a conflicting file exists. Now in This means we could safely deprecate and then remove both the overwriting behavior and keep_files_on_create, making MyISAM/Aria to always return an error, if a conflicting file exists. Additionally, the overwrite check could be optimized. Now (see my_create_with_symlink()) it costs one or two access() calls to see whether a confliciting file exists. Instead it should set O_EXCL and rely on create() to return an error. |
| Comments |
| Comment by Sergei Golubchik [ 2021-12-06 ] |
|
pushed into preview-10.8- |
| Comment by Ramesh Sivaraman [ 2022-01-25 ] |
|
ok to push |