Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25312

Remove fil_space_t::name and related code

Details

    Description

      InnoDB allocates a tablespace name that is more or less a copy of the internal table name, and it does not use that for anything useful. There used to be a hash table of tablespace names (fil_system->name_hash), but it had been removed already in MDEV-12266 (10.3.6).

      A consistency check for fil_space_t::name is causing recovery failures in MDEV-25180 (Atomic ALTER TABLE). So, we'd better remove that field altogether.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä added a comment - - edited

            wlad, you suggested that it is OK to simplify code and use the forward slash on Microsoft Windows. So, as part of this simplification, we would remove os_normalize_path() and instead add some Windows-specific code that will treat some occurrences of the backslash in the same way as we would treat a forward slash.

            This change will break compatibility on Microsoft Windows in two ways:

            1. A crash-upgrade from 10.5 to 10.6 might not work. But we do not really recommend to do it anyway.
            2. If someone specified a Microsoft Windows UNC (Universal Naming Convention) path for a DATA DIRECTORY or any of the InnoDB directory parameters, then things will likely fail.

            Here is an example of what would start to fail (with double escaping, as needed in a .test file):

            CREATE TABLE t(a INT) ENGINE=InnoDB
            DATA DIRECTORY '\\\\\\\\?\\\\Volume{ae26d559-276d-11e6-80c1-000d3a3019c7}\\\\share\\\\';
            

            Apparently, forward slashes are not allowed in path names that start with the characters that precede the string Volume. (Jira does not allow me to write the backslashes outside a code block.)

            File names like E:/share/test/t.ibd or \\server\share/test/t.ibd will work just fine.

            marko Marko Mäkelä added a comment - - edited wlad , you suggested that it is OK to simplify code and use the forward slash on Microsoft Windows. So, as part of this simplification, we would remove os_normalize_path() and instead add some Windows-specific code that will treat some occurrences of the backslash in the same way as we would treat a forward slash. This change will break compatibility on Microsoft Windows in two ways: A crash-upgrade from 10.5 to 10.6 might not work. But we do not really recommend to do it anyway. If someone specified a Microsoft Windows UNC ( Universal Naming Convention ) path for a DATA DIRECTORY or any of the InnoDB directory parameters, then things will likely fail. Here is an example of what would start to fail (with double escaping, as needed in a .test file): CREATE TABLE t(a INT ) ENGINE=InnoDB DATA DIRECTORY '\\\\\\\\?\\\\Volume{ae26d559-276d-11e6-80c1-000d3a3019c7}\\\\share\\\\' ; Apparently, forward slashes are not allowed in path names that start with the characters that precede the string Volume. (Jira does not allow me to write the backslashes outside a code block.) File names like E:/share/test/t.ibd or \\server\share/test/t.ibd will work just fine.

            Looks fine

            wlad Vladislav Vaintroub added a comment - Looks fine

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.