persisted innodb_buffer_pool_size is an uninitialized variable

Description

SET PERSIST innodb_buffer_pool_size= 1024;

and restarting the server causes `innodb_buffer_pool_size` to be uninitialized.

Valgrind shows:

==28138== by 0x405946D: innodb_buffer_pool_size_update(THD*, SYS_VAR*, void*, void const*) (ha_innodb.cc:18643) ==28138== by 0x2C1DE1E: sys_var_pluginvar::global_update(THD*, set_var*) (sql_plugin_var.cc:417) ==28138== by 0x2AC97D6: sys_var::update(THD*, set_var*) (set_var.cc:252) ==28138== by 0x2ACBEDE: set_var::update(THD*) (set_var.cc:1006) ==28138== by 0x2ACB2FE: sql_set_variables(THD*, List<set_var_base>*, bool) (set_var.cc:771) ==28138== by 0x2A8D33C: Persisted_variables_cache::set_persist_options(bool) (persisted_variable.cc:723) ==28138== by 0x2A031EF: mysqld_main(int, char**) (mysqld.cc:6616) ==28138== by 0x2823BE4: main (main.cc:30)

I located the issue to `set_var.save_result` that is not set in `innodb_buffer_pool_size_validate(save)`.

Environment

None

Smart Checklist

Activity

Show:

Laurynas Biveinis November 28, 2018 at 5:28 PM

This is more visible for the user in 8.0 with SET PERSIST than in 5.7, even if the root cause is the same - IMHO better to file a different bug for 5.7

Przemyslaw Skibinski November 23, 2018 at 2:52 PM

The issue also concerns 5.7 with:

SET GLOBAL innodb_buffer_pool_size= 25165824;

but it's not detected in MTR.

Only Valgrind shows issues.

Done

Details

Assignee

Reporter

Time tracking

1d logged

Fix versions

Affects versions

Priority

Smart Checklist

Created November 23, 2018 at 1:28 PM
Updated March 6, 2024 at 12:39 PM
Resolved November 29, 2018 at 9:10 AM