Hi Sergei, On Fri, Jan 21, 2022 at 10:45 AM Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Marko,
On Jan 21, Marko Mäkelä wrote:
Why InnoDB tests depend on server's symlink support? InnoDB does not use symlinks, it uses isl files.
In https://jira.mariadb.org/browse/MDEV-26870 you suggested using my_use_symdir, which I did. That variable is bound to the Boolean start-up parameter symbolic_links.
Changing InnoDB to use actual symlinks (and to stop creating "databasename" directories, to be similar to other storage engines) would be a file format change that could break downgrades to earlier minor versions. Therefore, it is only doable in a development release.
That's not what I meant. I was saying, --skip-symbolic-links and filesystem support of symbolic links are unrelated.
If --skip-symbolic-links was not specified, a filesystem can support symbolic links or not support them. In the latter case, I think, InnoDB technically still could use DATA DIRECTORY, even if MyISAM cannot.
That is true, the InnoDB attribute DATA DIRECTORY can be technically supported on any file system. The ticket MDEV-26870 gradually evolved to a request for InnoDB to be able to disable its DATA DIRECTORY feature. Quoting your comments:
This is not what skip-symbolic-links affects. It disables DATA/INDEX DIRECTORY support. You won't be able to create tables with DATA DIRECTORY or INDEX DIRECTORY attributes. In other words, the server won't create symlinks. But you can, and the server will access symlinked files all right. [snip] But, I think, users expect skip-symbolic-links to affect isl files too. Shall we treat it as a bug?
I think that this reasoning makes sense. If you think that my way of avoiding test failures with ./mtr --mysqld=--skip-symbolic-links is confusing, I am open to suggestions. Please find a revised fix at https://github.com/MariaDB/server/commit/c1d7b4575e67bd0ef458457859cdf7de32b... It is a little different, in that native ALTER TABLE in InnoDB will always retain any DATA DIRECTORY attribute while TRUNCATE will silently discard it. Marko -- Marko Mäkelä, Lead Developer InnoDB MariaDB Corporation