Details

    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 MDEV-11412 the server has got a way to delete orphan files. And after MDEV-17567 orphan files should never happen at all without manual tinkering with the datadir.

      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.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Sergei Golubchik made transition -
            Open Closed
            468d 6h 32m 1
            Sergei Golubchik made transition -
            Closed Stalled
            28m 54s 1
            Sergei Golubchik made transition -
            Stalled In Testing
            10s 1
            Ramesh Sivaraman made transition -
            In Testing Stalled
            49d 16h 42m 1
            Alexander Barkov made transition -
            Stalled Closed
            21h 42m 1

            People

              bar Alexander Barkov
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.