MDEV-25177 Better indication of refusing to start because of ProtectHome

Create test for for case insensitive gives a basic warning on creating
a test file and the next thing a user might see is an abort.

ProtectHome and other systemd setting protect system services from
accessing user data. Unfortunately some of our users do put things
on /home due space or other reasons.

Rather than enumberate the systemd options in a very clunkly fragile
way we put an error associated with the "Can't create test file" and
hope the user can work it out from there.

%M tip thanks Sergei.
This commit is contained in:
Daniel Black 2023-08-31 09:13:47 +10:00
parent d0a872c20e
commit 91ab819451

View File

@ -9299,7 +9299,7 @@ static int test_if_case_insensitive(const char *dir_name)
buff, 0666, O_RDWR, MYF(0))) < 0)
{
if (!opt_abort)
sql_print_warning("Can't create test file %s", buff);
sql_print_warning("Can't create test file '%s' (Errcode: %M)", buff, my_errno);
DBUG_RETURN(-1);
}
mysql_file_close(file, MYF(0));