Description:
SET PERSISTS does not work as described IMHO and behaves a bit random...
How to repeat:
mysql> show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 134217728 |
+-------------------------+-----------+
mysql> set persist innodb_buffer_pool_size=256*1024*1024;
mysql> show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 268435456 |
+-------------------------+-----------+
shell> cat mysqld-auto.cnf ; echo ""
{ "mysql_server": {"innodb_buffer_pool_size": "134217728" } }
shell> restart
mysql> show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 134217728 |
+-------------------------+-----------+
mysql> set persist innodb_buffer_pool_size=256*1024*1024;
mysql> show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 268435456 |
+-------------------------+-----------+
shell> cat mysqld-auto.cnf
{ "mysql_server": {"innodb_buffer_pool_size": "134217728" } }
Suggested fix:
I expect that the NEW value is persisted and survives a restart.
The values from mysqld-auto.cnf was:
{ "mysql_server": {"innodb_buffer_pool_size": "134217728" } }
{ "mysql_server": {"innodb_buffer_pool_size": "268435456" } }
{ "mysql_server": { } }