Description:
Previously, there were more variables which could only be set during --initialize, such as in 5.7:
"The number of undo tablespaces used by InnoDB is controlled by the innodb_undo_tablespaces option. This option can only be configured when initializing the MySQL instance. It cannot be changed afterward."
It would be nice if any remaining settings of this type were differentiated in performance_schema.variables_metadata and if it was also possible to see if a given variable is runtime dynamic.
How to repeat:
mysql> SELECT VARIABLE_NAME, VARIABLE_SCOPE FROM performance_schema.variables_metadata
WHERE VARIABLE_NAME LIKE 'innodb%'
AND VARIABLE_SCOPE NOT IN ('GLOBAL','SESSION')\G
Empty set (0.00 sec)
mysql> SELECT * FROM performance_schema.variables_metadata WHERE VARIABLE_NAME='innodb_doublewrite_pages'\G
*************************** 1. row ***************************
VARIABLE_NAME: innodb_doublewrite_pages
VARIABLE_SCOPE: GLOBAL
DATA_TYPE: Integer
MIN_VALUE: 1
MAX_VALUE: 512
DOCUMENTATION: Number of double write pages per thread
1 row in set (0.00 sec)
mysql> SELECT * FROM performance_schema.variables_metadata WHERE VARIABLE_NAME='innodb_page_size'\G
*************************** 1. row ***************************
VARIABLE_NAME: innodb_page_size
VARIABLE_SCOPE: GLOBAL
DATA_TYPE: Integer
MIN_VALUE: 4096
MAX_VALUE: 65536
DOCUMENTATION: Page size to use for all InnoDB tablespaces.
1 row in set (0.00 sec)
Suggested fix:
It would be helpful if there was one or more additional values for variable_scope such as GLOBAL_INITIALIZE or GLOBAL_INSTANCE, along with a new boolean column VARIABLE_DYNAMIC.
Furthermore, it would be very nice to be able to tell from this table, whether a configured value differs from the setting value at startup, for example:
VARIABLE_SOURCE: default, configuration, persisted, user