Know your my.cnf groups, part II

Posted in: Technical Track

Ronald Bradford‘s recent warning to be sure to know your my.cnf sections reminded me of a similar issue that I ran into last summer, where putting the “group” option in both the [mysqld_safe] and [mysqld] directives resulted in a mostly silent problem.

I started noticing this in MySQL 5.1 and it affected both the official MySQL binary and the Percona binary. In trying to be conscientious, I had the following set:

[mysqld_safe] user=mysql

[mysqld] user=mysql

However, when the MySQL server started up, the error log showed

[Warning] option 'group_concat_max_len': unsigned value 0 adjusted to 4

This was obviously a problem, but I only started noticing it during MySQL restarts, which was mostly during upgrades to MySQL 5.1. I tracked it down and realized that when I removed the “group” option from the [mysqld] directive, the warning did not come up.

The problem is that [safe_mysqld] sees “group” as the “group” option, but [mysqld] does not know about the “group” option. The MySQL server allows the shortest unique identifier of an option to *be* that option. Thus, “group” is an acceptable abbreviation for “group_concat_max_len”.

So mysqld was taking:

and translating it to:

but “mysql” is a string, not a number, so MySQL tried to be helpful by converting to a number….so it was as if I stated:

I filed a bug for this back in June: The response was “If 3 different people ask about removing this feature reclassifying report to feature request with new synopsis.”

So, a second moral: make a bug report if you want things to get changed, and if you see a bug report for a problem you’re encountering, make sure to add your voice so that MySQL understands that an issue is indeed serious.


Interested in working with Sheeri? Schedule a tech call.

3 Comments. Leave new

Log Buffer #176: a Carnival of the Vanities for DBAs | The Pythian Blog
January 29, 2010 2:03 pm

[…] Sheeri K. Cabral responds with Know your my.cnf groups, part II. […]


Why are you complaining? Mysql told you there was something wrong with your configuration change, it’s not their fault if you ignored it.

I don’t see how it’s a bug, it sounds to me like user error.


Geoff — MySQL told me there was something wrong with “group_concat_max_len”. We had an entry for that, and there didn’t seem to be anything wrong with it, yet mysteriously the warning remained.

Nothing in the error message told us that the problem was with the “group” entry — it should have said “the ‘group’ option for mysqld does not exist” or given some other kind of syntax error.

We figured it out eventually, but it’s not widely known that MySQL will try to expand options to what it *thinks* you meant.


Leave a Reply

Your email address will not be published. Required fields are marked *