[MDEV-9474] group_concat_max_len not being read from /etc/my.cnf Created: 2016-01-27  Updated: 2016-02-24  Resolved: 2016-02-24

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 10.1.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Jan Steinman Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

MacOS X 10.10.5 via Homebrew


Issue Links:
Relates
relates to MDEV-7635 update defaults and simplify mysqld c... Closed
relates to MDEV-8292 group_concat_max_len should be stored... Open

 Description   

It seems to me that group_concat_max_len is not being read from /etc/my.cnf.

I have this in /etc/my.cnf, in the [mysqld] section: "group_concat_max_len = 65536". But when the server re-starts, it goes back to the default of 1k (too small!). Copying and pasting that same string into mysql (prepended with SET GLOBAL) does work.

Upon stopping and re-starting the server, nothing shows up in the log to indicate that /etc/my.cnf may have not been read all the way through.

I looked around the website, but could see no documentation for which system variables are honoured in /etc/my.cnf, and I didn't see any way to set this via mysqld arguments, so I have to wait until someone tells me a web page look weird before going in through mysql to fix it!



 Comments   
Comment by Elena Stepanova [ 2016-01-27 ]

The variable in the config file works just fine for me:

elenst@linux-0bhr:/releases/mariadb-10.1.9-linux-x86_64> cat mdev9474.cnf 
[mysqld]
group_concat_max_len = 65536
 
elenst@linux-0bhr:/releases/mariadb-10.1.9-linux-x86_64> bin/mysqld_safe --defaults-file=/releases/mariadb-10.1.9-linux-x86_64/mdev9474.cnf &
[1] 15794
elenst@linux-0bhr:/releases/mariadb-10.1.9-linux-x86_64> 160127 14:45:19 mysqld_safe Logging to '/releases/mariadb-10.1.9-linux-x86_64/data/linux-0bhr.suse.err'.
160127 14:45:19 mysqld_safe Starting mysqld daemon with databases from /releases/mariadb-10.1.9-linux-x86_64/data
 
elenst@linux-0bhr:/releases/mariadb-10.1.9-linux-x86_64> bin/mysql -uroot --protocol=tcp --port=3306
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.9-MariaDB MariaDB Server
 
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@group_concat_max_len;
+------------------------+
| @@group_concat_max_len |
+------------------------+
|                  65536 |
+------------------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> select @@version;
+----------------+
| @@version      |
+----------------+
| 10.1.9-MariaDB |
+----------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> 

The reason is usually one of two: either your config file is not read at all, or the option is later overridden in another section or another config file. Given that you are getting the default value, the first reason is more likely.

To check it, first start the server with the explicit --defaults-file=/etc/my.cnf option (it must be the first option on the command line!). If the option now gets set all right, it means your installation is such that it does not read from /etc/my.cnf by default. If the server does not start, it will say why, for example, current user does not have permissions to read the file. If the server starts but the option is still not set, check later sections and include directives in the file, something must be overridding the option.

Regarding your question about documentation, this is the page:
https://mariadb.com/kb/en/mariadb/server-system-variables/

Most variables work both from the config file and from the command-line, so if it is not mentioned specifically, it should be the case. Same goes for group_concat_max_len.

Comment by Elena Stepanova [ 2016-02-24 ]

Please comment to re-open if you have further information on the issue.

Generated at Thu Feb 08 07:34:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.