[MDEV-25034] Feature request: Server system variables source of configuration Created: 2021-03-02  Updated: 2021-03-30  Resolved: 2021-03-30

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Server, Variables
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Oli Sennhauser Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: configuration, server, source, variable


 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...



 Comments   
Comment by Oli Sennhauser [ 2021-03-02 ]

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.

Comment by Elena Stepanova [ 2021-03-28 ]

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)

Comment by Oli Sennhauser [ 2021-03-29 ]

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

Comment by Oli Sennhauser [ 2021-03-30 ]

I think then it can be closed. Shall I?

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