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

Feature request: Server system variables source of configuration

Details

    Description

      When we analyse MariaDB servers of our customers it is sometimes not clear from where (which file) a specific configuration variable is coming from.

      Thus it would be greate to see the configuration source of a variable. For example:

      {{SQL> SELECT * FROM information_schema.global_variables LIMIT 10;
      +----------------------------------------------+----------------+------------------------------------+
      | VARIABLE_NAME                                | VARIABLE_VALUE | VARIABLE_SOURCE                    |
      +----------------------------------------------+----------------+------------------------------------+
      | INNODB_LOG_CHECKSUMS                         | ON             | default                            |
      | PERFORMANCE_SCHEMA                           | ON             | /etc/mysql/my.cnf                  |
      | SYSTEM_VERSIONING_ALTER_HISTORY              | ERROR          | /etc/mysql/conf.d/mariadb.cnf      |
      | UNIQUE_CHECKS                                | ON             | /etc/mysql/mariadb.conf.d/blub.cnf |
      | PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE | 10             | default                            |
      | MAX_RELAY_LOG_SIZE                           | 134217728      | online                             |
      | PERFORMANCE_SCHEMA_MAX_COND_CLASSES          | 90             | default                            |
      | HAVE_RTREE_KEYS                              | YES            | /etc/mysql/my.cnf                  |
      | PERFORMANCE_SCHEMA_MAX_COND_INSTANCES        | -1             | default                            |
      +----------------------------------------------+----------------+------------------------------------+
      

      Where variable source can be:

      • A filename where it was configured
      • default if it was NOT configured at all
      • online if it was configured dynamic/online with SET GLOBAL ...

      I have not found this FR in jira. I hope I have searched good enough...

      Attachments

        Activity

          oli Oli Sennhauser created issue -

          It could also be interesting to show if this variable can be changed dynamically and what is/was the hardcoded default? The later one gives the possibility to see which variable was (miss-)configured quite quickly.

          oli Oli Sennhauser added a comment - It could also be interesting to show if this variable can be changed dynamically and what is/was the hardcoded default? The later one gives the possibility to see which variable was (miss-)configured quite quickly.
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description When we analyse MariaDB servers of our customers it is sometimes not clear from where (which file) a specific configuration variable is coming from.

          Thus it would be greate to see the configuration source of a variable. For example:

          {{SQL> SELECT * FROM information_schema.global_variables LIMIT 10;
          +----------------------------------------------+----------------+------------------------------------+
          | VARIABLE_NAME | VARIABLE_VALUE | VARIABLE_SOURCE |
          +----------------------------------------------+----------------+------------------------------------+
          | INNODB_LOG_CHECKSUMS | ON | default |
          | PERFORMANCE_SCHEMA | ON | /etc/mysql/my.cnf |
          | SYSTEM_VERSIONING_ALTER_HISTORY | ERROR | /etc/mysql/conf.d/mariadb.cnf |
          | UNIQUE_CHECKS | ON | /etc/mysql/mariadb.conf.d/blub.cnf |
          | PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE | 10 | default |
          | MAX_RELAY_LOG_SIZE | 134217728 | online |
          | PERFORMANCE_SCHEMA_MAX_COND_CLASSES | 90 | default |
          | HAVE_RTREE_KEYS | YES | /etc/mysql/my.cnf |
          | PERFORMANCE_SCHEMA_MAX_COND_INSTANCES | -1 | default |
          +----------------------------------------------+----------------+------------------------------------+
          }}
          Where variable source can be:
          * A filename where it was configured
          * default if it was NOT configured at all
          * online if it was configured dynamic/online with SET GLOBAL ...

          I have not found this FR in jira. I hope I have searched good enough...
          When we analyse MariaDB servers of our customers it is sometimes not clear from where (which file) a specific configuration variable is coming from.

          Thus it would be greate to see the configuration source of a variable. For example:
          {code:sql}
          {{SQL> SELECT * FROM information_schema.global_variables LIMIT 10;
          +----------------------------------------------+----------------+------------------------------------+
          | VARIABLE_NAME | VARIABLE_VALUE | VARIABLE_SOURCE |
          +----------------------------------------------+----------------+------------------------------------+
          | INNODB_LOG_CHECKSUMS | ON | default |
          | PERFORMANCE_SCHEMA | ON | /etc/mysql/my.cnf |
          | SYSTEM_VERSIONING_ALTER_HISTORY | ERROR | /etc/mysql/conf.d/mariadb.cnf |
          | UNIQUE_CHECKS | ON | /etc/mysql/mariadb.conf.d/blub.cnf |
          | PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE | 10 | default |
          | MAX_RELAY_LOG_SIZE | 134217728 | online |
          | PERFORMANCE_SCHEMA_MAX_COND_CLASSES | 90 | default |
          | HAVE_RTREE_KEYS | YES | /etc/mysql/my.cnf |
          | PERFORMANCE_SCHEMA_MAX_COND_INSTANCES | -1 | default |
          +----------------------------------------------+----------------+------------------------------------+
          {code}
          Where variable source can be:
          * A filename where it was configured
          * default if it was NOT configured at all
          * online if it was configured dynamic/online with SET GLOBAL ...

          I have not found this FR in jira. I hope I have searched good enough...
          elenst Elena Stepanova added a comment - - edited

          You can already see most (or even all) of it in information_schema.system_variables.

          10.5

          MariaDB [test]> select variable_name, global_value, session_value, default_value, global_value_origin, variable_scope, read_only, global_value_path from information_schema.system_variables where variable_name in ('innodb_lock_wait_timeout','lock_wait_timeout','innodb_rollback_on_timeout','connect_timeout','wait_timeout');
          +----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+
          | variable_name              | global_value | session_value | default_value | global_value_origin | variable_scope | read_only | global_value_path              |
          +----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+
          | LOCK_WAIT_TIMEOUT          | 11           | 11            | 86400         | CONFIG              | SESSION        | NO        | /bld/10.4/1.cnf                |
          | CONNECT_TIMEOUT            | 10           | NULL          | 10            | COMPILE-TIME        | GLOBAL         | NO        | NULL                           |
          | INNODB_ROLLBACK_ON_TIMEOUT | OFF          | NULL          | OFF           | COMPILE-TIME        | GLOBAL         | YES       | NULL                           |
          | WAIT_TIMEOUT               | 28800        | 120           | 28800         | COMPILE-TIME        | SESSION        | NO        | NULL                           |
          | INNODB_LOCK_WAIT_TIMEOUT   | 60           | 60            | 50            | SQL                 | SESSION        | NO        | NULL                           |
          +----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+
          5 rows in set (0.003 sec)
          

          elenst Elena Stepanova added a comment - - edited You can already see most (or even all) of it in information_schema.system_variables . 10.5 MariaDB [test]> select variable_name, global_value, session_value, default_value, global_value_origin, variable_scope, read_only, global_value_path from information_schema.system_variables where variable_name in ( 'innodb_lock_wait_timeout' , 'lock_wait_timeout' , 'innodb_rollback_on_timeout' , 'connect_timeout' , 'wait_timeout' ); + ----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+ | variable_name | global_value | session_value | default_value | global_value_origin | variable_scope | read_only | global_value_path | + ----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+ | LOCK_WAIT_TIMEOUT | 11 | 11 | 86400 | CONFIG | SESSION | NO | /bld/10.4/1.cnf | | CONNECT_TIMEOUT | 10 | NULL | 10 | COMPILE- TIME | GLOBAL | NO | NULL | | INNODB_ROLLBACK_ON_TIMEOUT | OFF | NULL | OFF | COMPILE- TIME | GLOBAL | YES | NULL | | WAIT_TIMEOUT | 28800 | 120 | 28800 | COMPILE- TIME | SESSION | NO | NULL | | INNODB_LOCK_WAIT_TIMEOUT | 60 | 60 | 50 | SQL | SESSION | NO | NULL | + ----------------------------+--------------+---------------+---------------+---------------------+----------------+-----------+--------------------------------+ 5 rows in set (0.003 sec)
          elenst Elena Stepanova made changes -
          Affects Version/s N/A [ 14700 ]
          Environment n.a.
          Issue Type Bug [ 1 ] Task [ 3 ]

          Oh, my bad! I did not look carefully enough. Sorry!

          oli Oli Sennhauser added a comment - Oh, my bad! I did not look carefully enough. Sorry!

          I think then it can be closed. Shall I?

          oli Oli Sennhauser added a comment - I think then it can be closed. Shall I?
          elenst Elena Stepanova made changes -
          Fix Version/s N/A [ 14700 ]
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 119687 ] MariaDB v4 [ 134403 ]

          People

            Unassigned Unassigned
            oli Oli Sennhauser
            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.