[MDEV-29096] log_error ignored in my.cnf file if log_basename set Created: 2022-07-13  Updated: 2022-08-06

Status: Open
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Nuno Assignee: Ian Gilfillan
Resolution: Unresolved Votes: 0
Labels: None


 Description   

With 10.8.3, "log_error" was working fine until the 29th June, and only now I noticed that since the restart on that day, the "log_error" property in "my.cnf" file is being ignored, and instead it's defaulting to "./mysql.err". There was no MariaDB update around that day.

I restarted MariaDB yesterday, and "log_error" continues to be ignored.

I confirm that the path (outside datadir) exists and is accessible by the user mysql (also set in user property).

I checked several of the other properties, and they seem to be OK (not ignored).

I added this recently:

log_basename = "mysql"

I suspect this might be the cause.

Does setting log_basename make log_error be ignored?

I added it to make any other files have that prefix instead of the hostname, but I was assuming I could still override the path of the logs separately, like for log_error.

I also get this warning:

[Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to files use the --log-output=file option.

Even though I don't specify any "log_show_queries" option.

Thank you.



 Comments   
Comment by Sergei Golubchik [ 2022-07-24 ]

try to put log-error after log-basename in your my.cnf file.

Comment by Nuno [ 2022-07-24 ]

serg - ah, good one!

I can't test it right now as this will require a restart, but I'll make the config change now anyway.

But, if this is the way to resolve the issue, could it be mentioned in the documentation, please?

Thank you!

Comment by Sergei Golubchik [ 2022-07-24 ]

First, let's wait for you to confirm that it worked. I did test it, of course, but it'd be good to know that it helped you.

Second, this is the usual behavior, of all options, they apply in order, and later options override earlier options. The manual mentions it (here: https://mariadb.com/kb/en/configuring-mariadb-with-option-files/) but very briefly, in passing: override previously specified setting

This behavior should be stated explicitly, we'll do that.

Comment by Nuno [ 2022-07-25 ]

Thanks serg.
I'll definitely write here whenever I have a chance to restart MariaDB.

About this other warning I mentioned above:

[Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to files use the --log-output=file option.

The documentation says this variable was removed in MariaDB 10.0 - https://mariadb.com/kb/en/server-system-variables/#log_slow_queries
Why am I getting this warning, then, if this variable was already removed?

Comment by Nuno [ 2022-07-27 ]

serg - yup, that worked - just restarted MariaDB. Thank you!

(please let me know if you'd know the answer to my question above)

Have a great day.

Comment by Sergei Golubchik [ 2022-08-04 ]

I've rephrased the warning, it'll say

Although a slow query log file was specified, log tables are used. To enable logging to files use the --log-output=file option.

In your case it was --log-basename that set the slow query log file path.

Comment by Nuno [ 2022-08-06 ]

Thanks serg, for clarifying. That's great then. In that case, I believe this Issue can be closed.
Have a great day!

Generated at Thu Feb 08 10:05:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.