MariaDB reads the UMASK and UMASK_DIR environment variables to determine what permissions to use when creating new files.
However, these environment variables are not actually used as umasks. They are just used as regular file system permission modes.
You can see the environment variables are read here:
And then they are used as the mode argument when creating new files with open() here:
This is pretty confusing behavior. If the environment variables have UMASK in the name, then shouldn't they be used as umasks? And if the environment variables are used as file system permission modes, then shouldn't the names reflect that?