Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9474

group_concat_max_len not being read from /etc/my.cnf

Details

    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!

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - - edited

            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.

            elenst Elena Stepanova added a comment - - edited 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 .

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

            elenst Elena Stepanova added a comment - Please comment to re-open if you have further information on the issue.

            People

              Unassigned Unassigned
              Bytesmiths Jan Steinman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.