Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit 3695eed

Browse files
committed
Bug#33912761: Plugin persisted variable restore issue
Description: ----------- Plugin persisted variables are actually restored from persisted storage after loading the registered plugin on startup with the call of Persisted_variables_cache::set_persisted_options(false), although the "false" parameter means to restore only non-plugin variables. Analysis: -------- Initially all plugin persisted variables are loaded in m_persisted_dynamic_variables, but that's intentional. After the first call to set_persisted_options(false), all plugin variables that failed to be assigned to initially loaded plugins will be added to m_persisted_dynamic_plugin_variables as well, so things will work fine for subsequent set_persisted_options(true) calls done when installing plugins with the SQL command. Solution: -------- Leave code as is, just document that initial call to set_persisted_options(false) is required to initialize plugin specific list. Approved by: Bharathy Satish <bharathy.x.satish@oracle.com> Approved by: Georgi Kodinov <georgi.kodinov@oracle.com> RB: 27742 Change-Id: I339005c79d2f270733bba451c5e740e012e3e78e
1 parent eba125b commit 3695eed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎sql/persisted_variable.cc‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,10 @@ void Persisted_variables_cache::set_parse_early_sources() {
921921
set_persisted_options() will set the options read from persisted config file
922922
923923
This function does nothing when --no-defaults is set or if
924-
persisted_globals_load is set to false
924+
persisted_globals_load is set to false.
925+
Initial call to set_persisted_options(false) is needed to initialize
926+
m_persisted_dynamic_plugin_variables set, so that next subsequent
927+
set_persisted_options(true) calls will work with correct state.
925928
926929
@param [in] plugin_options Flag which tells what options are being set.
927930
If set to false non dynamically-registered

0 commit comments

Comments
 (0)