Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
I can disable the the ability to use symbolic links for files by setting skip-symbolic-links
I can test that this condition is on with the following query:
select @@have_symlink;
|
+----------------+
|
| @@have_symlink |
|
+----------------+
|
| DISABLED |
|
+----------------+
|
This setting does not prevent the use of symbolic links. I have tested symbolic links for subdirectories of datadir and for individual files. I have tested the following versions:
- 10.5.12-8-MariaDB-enterprise
- 10.6.4-1-MariaDB-enterprise
- 10.5.12-MariaDB-1:10.5.12+maria~buster (community)
The implementation of the DATA DIRECTORY attribute for InnoDB in MySQL 5.6 included at least the following questionable changes:
MDEV-22343.)This example would create and not remove the subdirectory /d/a because the data file would have been not /d/b.ibd but /d/a/b.idb.
I wish MariaDB had not copied this from MySQL. I fully agree that it is a good idea for administrators to be able to disable the use of the DATA DIRECTORY attribute for InnoDB tables.
serg, wlad, how should InnoDB implement this check? By referring to the variable my_disable_symlinks? Or have_symlink? No storage engine is checking this option directly.
I suppose that we may enforce the check on CREATE TABLE and on ALTER TABLE that explicitly mentions DATA DIRECTORY. Would we also want to refuse all table-rebuilding operations (OPTIMIZE, TRUNCATE, ALTER) if the table has been defined with a DATA DIRECTORY attribute?